When I was a secondary school student, I was quite satisfied with this proof of Cauchy–Schwarz Inequality.
Equality holds if and only if $\forall i,j = 1,\dots,n, a_i b_j  a_j b_i = 0$. I was so happy that I didn’t think of further generalisations. I didn’t realise that the inequality can be more concisely written as $\langle \vect{a}, \vect{b} \rangle^2 \le \norm{\vect{a}}^2 \norm{\vect{b}}^2$, where $\vect{a} = (a_1,\cdots,a_n), \vect{b} = (b_1,\cdots,b_n) \in \R^n$
This Friday evening, I did a question about the integral version of the inequality. After spending hours to come up with an idea, I realised why I needed to learn inner product spaces. The very first version of the inequality that I learnt has too many summation signs, and it can’t be easily generalised to other spaces. The second proof of the same inequality that I learnt makes use of the determinant of a quadratic polynomial $p(t) = \norm{\vect{u}  t \vect{v}}^2$. That proof is much more elegant, and it helped me a lot while I was doing that question. When equality holds, it’s very hard to imagine what happens by looking at the original equality. However, if we convert it into the determinant of $p(t)$, then one quickly knows that this is equivalent to $p(t) = 0$, and can easily conclude that equality holds if and only if the two functions $f$ and $g$ satisfy $f \equiv k g$ for some $k \in \R$ for almost all points.^{1}

To be more precise, if one accepts that the space $C([a,b])$ of continuous functions defined on a closed and bounded interval $[a,b]$ in an inner product space, and $f,g \in C([a,b])$, then the condition “for almost all points” can be dropped. If we don’t to want be to so strict on the functions $f$ and $g$ defined on $[a,b]$, and we just say that $f$ and $g$ are integrable functions defined on $[a,b]$, then we have to accept the fact that $\int_a^b f^2 = 0$ doesn’t imply that $f \equiv 0$. ↩