I have seen the thin lens equation, which describes the following relation.
$$\frac{1}{\text{image distance}} + \frac{1}{\text{object distance}} = \frac{1}{\text{focal length}} \tag{1}$$
However, I've also seen the following relation.
$$\frac{\text{object height}}{\text{image height}} = \frac{\text{object distance}}{\text{focal length}} \tag{2}$$
I was wondering how you get to one from the other, and what exactly the difference is, in terms of what they're trying to model?