Two vectors having the same direction are at an angle #0#. If they have opposite direction, then their angle is #\pi#, which corresponds to #180^\circ#. The angle #\frac{\pi}{2}# (or #90^\circ#), lying right between these two, has a special significance.
Let #V# be an inner product space. Two vectors #\vec{a}# and #\vec{b}# of #V# are perpendicular to each other if #\dotprod{\vec{a}}{\vec{b}} = 0#. In this case, we write #\vec{a}\ \perp\ \vec{b}#.
In this definition #\vec{a}# and/or #\vec{b}# may be the zero vector.
Because #\dotprod{\vec{a}}{\vec{b}} =\dotprod{\vec{b}}{\vec{a}} #, the vector #\vec{a}# is perpendicular to #\vec{b}# if and only if #\vec{b}# is perpendicular to #\vec{a}#. In other words: the perpendicularity relation is symmetric.
In #\mathbb{R}^n# with the standard inner product, for each #i# and #j# with #i\neq j# the vectors #\vec{e}_i# and #\vec{e}_j# are perpendicular to each other. In addition, each of these vectors has length #1#. These properties are called orthonormality and will later play an important role for inner product spaces.
When #\vec{a}# and #\vec{b}# are distinct from the zero vector, then it follows from #\vec{a}\perp\vec{b}# that the angle #\varphi# between the two vectors satisfies #\cos(\varphi) = 0#, so #\varphi=\frac{\pi}{2}# (that is, #90^\circ#). This corresponds to the case of the plane which we discussed.
By means of the definition of angles, we can place the Pythagorean theorem in a formal setting.
Let #V# be an inner product space.
- The vectors #\vec{a}# and #\vec{b}# are perpendicular to each other if and only if
\[\norm{\vec{a}+\vec{b}}^2 = \norm{\vec{a}}^2 + \norm{\vec{b}}^2 \]
- If the vectors #\vec{a}_1 \ldots ,\vec{a}_k# are mutually perpendicular, that is to say: #\dotprod{\vec{a}_i}{\vec{a}_j }=0# if #i\neq j#, then\[\norm{\vec{a}_1+\cdots + \vec{a}_k}^2 =\norm{\vec{a}_1}^2 +
\cdots + \norm{\vec{a}_k }^2\]
In order to prove the first part, we use the properties of the inner product and work out #\norm{\vec{a}+\vec{b}}^2#:
\[\begin{array}{rcl}
\norm{\vec{a}+\vec{b}}^2 & =&\dotprod{(\vec{a}+\vec{b})}{( \vec{a} + \vec{b})}\\&=&\dotprod{\vec{a} }{\vec{a}} + \dotprod{\vec{a}}{ \vec{b}}+
\dotprod{\vec{b}}{\vec{a}}+\dotprod{\vec{b}}{\vec{b}}\\
& =&\norm{\vec{a}}^2 +
\norm{\vec{b}}^2 +2(\dotprod{\vec{a}}{\vec{b}})
\end{array}
\] Since #\vec{a}# and #\vec{b}# are perpendicular by assumption, we have #\dotprod{\vec{a} }{\vec{b}}=0#. When we use this in the above expression, we find #\norm{\vec{a}+\vec{b}}^2 =\norm{\vec{a}}^2 +\norm{\vec{b}}^2#.
In order to prove the other implication we assume that #\norm{\vec{a}+\vec{b}}^2 =\norm{\vec{a}}^2 + \norm{\vec{b}}^2#. This implies that #2(\dotprod{\vec{a} }{\vec{b}})=0#, so #\dotprod{\vec{a}}{\vec{b}}=0# and consequently #\vec{a}\perp\vec{b}#. This proves the first statement.
The second statement follows by induction from the first. The full proof is left to the reader.
If we look at the vector space #V=\mathbb{R}^2# with the standard inner product, we get the Pythagorean theorem as we know it. If the vectors #\vec{a}# and #\vec{b}# are perpendicular to each other, then, according to the theorem, #\norm{\vec{a}+\vec{b}}^2=\norm{\vec{a}}^2+\norm{\vec{b}}^2#. The vector #\vec{a}+\vec{b}# is of course the vector #\vec{c}# of the Pythagorean theorem.
The fact that the second statement contains no 'if and only if', can be understood by looking at the following counterexample. Take the vectors #\vec{a}_1=\rv{1,0}#, #\vec{a}_2=\rv{0,1}#, and #\vec{a}_3=\rv{1,-1}#. We have \[\norm{\vec{a}_1+\vec{a}_2+\vec{a}_3}^2 = \norm{\rv{2,0}}^2=4\] and \[\norm{\vec{a}_1}^2 + \norm{\vec{a}_2}^2 + \norm{\vec{a}_3}^2= 1+1+2 = 4\] so the equality of the statement holds. However, the inner product #\dotprod{\vec{a}_1}{\vec{a}_3}# is equal to #1# and so the vectors #\vec{a}_1# and #\vec{a}_3# are not perpendicular!
Provide a vector of the inner product space #\mathbb{R}^3# (with the standard inner product), which is distinct from the zero vector and perpendicular to the vector \[\rv{8,9,7}\]
\(\rv{0,1,-{{9}\over{7}}}\)
The answer is not unique.
A vector #\rv{x,y,z}# is perpendicular to \( \rv{8,9,7}\) if and only if #\dotprod{\rv{8,9,7}}{\rv{x,y,z}}=0#. This means that we must have \[x\cdot 8+y\cdot 9 + z\cdot 7=0\] This is a single linear equation with three unknowns, so we can simply choose values for #x# and #y# (not both equal to #0# so as to avoid the zero vector for an answer) and solve the resulting linear equation in #z#.
We take #x=0# and #y=1#. This gives the equation #9+z\cdot 7=0#, which has solution #z=-{{9}\over{7}}#. We then find the vector
\[\rv{0,1,-{{9}\over{7}}}\]
The solution is not unique; each solution #\rv{x,y,z}# of #8 x+9 y+7 z=0# distinct from the zero vector is a good answer.