Like Mike I am no mathematician but yes composition can be worked to "composition by numbers". Could also Google perspective, composition any other words you can think of.
In my opinion learn too many rules and you have to brake one to follow another. Away from the math composition can also be about things like shape, form, colour, texture, light and dark, the balance of one thing with or against another, the list goes on and on.
All too much for my old brain much prefer "if it looks right it is".
Never the less, rules/guidelines good to know and use and then forget when you choose.
P.s. Just found
http://www.photographymad.com/pages/...position-rules . 10 basic guidelines for digital composition.