The fundamental definition of magnification is the ratio of the heights, h_{image}/h_{object}, with an inverted image treated as a negative height. Many physics textbooks use a geometric argument, using similar triangles, to show that this is equivalent to -v/u. The -v/u formula is generally more useful, since it's more common to give information about the distance from the lens rather than the height.