If $\langle a,b \rangle=0$, then $a,b$ are perpendicular? This is something that bothered me in my lectures on analytics geometry (because it was given without proof). I can see that $\langle (x,0),(0,y) \rangle=0$ easily, but what about when these two vectors are rotated? I believe I've been able to prove it for $2$-dimensions:
$$\langle A,B \rangle=\langle (|A|\cos\theta ,|A| \sin \theta ),(|B|\cos\psi ,|B| \sin \psi)\rangle\\ = |A||B|cos \theta \cos \psi+|A||B|\cos \theta \cos \psi\\=|A||B|(\cos\theta \cos\psi+ \sin \theta \sin \psi)\\=|A||B|\cos (\theta - \psi)$$
Now $\cos( \theta - \psi) =0$ exactly when $ \theta - \psi=n\pi  +\cfrac{\pi}{2}, n\in \Bbb{Z}$. That is basically, when the difference of the two angles is $\cfrac{\pi}{2},\cfrac{3\pi}{2}$.
 A: Given any nonzero vectors $\vec a, \vec b \in \mathbb R^n$, let $O$ be the origin and let $P$ and $Q$ be the points in $\mathbb R^n$ such that $\vec a = \overrightarrow{OP}$ and $\vec b = \overrightarrow{OQ}$. Let $\vec c = \overrightarrow{PQ}$ so that $\vec a + \vec c = \vec b$.
Observe that $\vec a \perp \vec b$ iff $\Delta OPQ$ satisfies the Pythagorean Theorem, where $PQ$ is the hypotenuse of the candidate right triangle. Indeed, notice that:
\begin{align*}
|\vec a|^2 + |\vec b|^2 = |\vec c|^2
&\iff |\vec a|^2 + |\vec b|^2 = |\vec b - \vec a|^2 \\
&\iff \langle \vec a, \vec a \rangle + \langle \vec b, \vec b \rangle = \langle \vec b + (-\vec a), \vec b + (-\vec a) \rangle \\
&\iff \langle \vec a, \vec a \rangle + \langle \vec b, \vec b \rangle = \langle \vec b, \vec b \rangle + \langle \vec b, -\vec a \rangle  + \langle -\vec a, \vec b \rangle + \langle -\vec a, -\vec a \rangle \\
&\iff \langle \vec a, \vec a \rangle + \langle \vec b, \vec b \rangle = \langle \vec b, \vec b \rangle -2\langle \vec a, \vec b \rangle + \langle \vec a, \vec a \rangle \\
&\iff 0 = -2\langle \vec a, \vec b \rangle \\
&\iff \langle \vec a, \vec b \rangle = 0
\end{align*}
