I want to know the proof that the continued fraction of $\sqrt{n}$ has a period.
This question and answer prove that when the continued fraction has a period, it can be represented by quadratic form. However, it doesn't prove that the continued fraction of quadratic form have a period. According to wikipedia, Lagrange prove it.
"Amazingly, Lagrange's discovery implies that the canonical continued fraction expansion of the square root of every non-square integer is periodic"
Does anybody know how to prove this?
I would recommend to read the posts of Ben Lynn on continued fractions. In particular, in the second theorem of this post, he proves what you are basically asking.
The sketch of the prove is the following: