# The Sum of Cosine Squared in an Inner Product Space

## Problem 551

Let $\mathbf{v}$ be a vector in an inner product space $V$ over $\R$.
Suppose that $\{\mathbf{u}_1, \dots, \mathbf{u}_n\}$ is an orthonormal basis of $V$.
Let $\theta_i$ be the angle between $\mathbf{v}$ and $\mathbf{u}_i$ for $i=1,\dots, n$.

Prove that
$\cos ^2\theta_1+\cdots+\cos^2 \theta_n=1.$

## Definition (Angle between Vectors).

Let $\langle\mathbf{a}, \mathbf{b}\rangle$ denote the inner product of vectors $\mathbf{a}$ and $\mathbf{b}$ in $V$.

Recall that the angle $\theta$ between $\mathbf{a}$ and $\mathbf{b}$ is defined as the unique number $\theta$ between $0$ and $\pi$ satisfying
$\cos \theta=\frac{\langle\mathbf{a}, \mathbf{b}\rangle}{\|\mathbf{a}\| \|\mathbf{b}\|}.$

## Proof.

Express the vector $\mathbf{v}$ as a linear combination of the basis vectors as
$\mathbf{v}=a_1\mathbf{u}_1+\dots+a_n\mathbf{u}_n$ for some real numbers $a_1, \dots, a_n$.

The length of the vector $\mathbf{v}$ is given by
$\|\mathbf{v}\|=\sqrt{a_1^2+\cdots+a_n^2}. \tag{*}$

For each $i$, we have using the properties of the inner product
\begin{align*}
\langle \mathbf{v}, \mathbf{u}_i\rangle&=\langle a_1\mathbf{u}_1+\dots+a_n\mathbf{u}_n, \mathbf{u}_i\rangle\\
&=a_1\langle\mathbf{u}_1, \mathbf{u}_i\rangle+\cdots +a_n \langle\mathbf{u}_n, \mathbf{u}_i \rangle\\
&=a_i \tag{**}
\end{align*}
since $\langle\mathbf{u}_i, \mathbf{u}_i\rangle=1$ and $\langle\mathbf{u}_j, \mathbf{u}_i\rangle=0$ if $j\neq i$ as $\{\mathbf{u}_1, \dots, \mathbf{u}_n\}$ is orthonormal.

By definition of the angle, we have
\begin{align*}
\cos \theta_i&=\frac{\langle\mathbf{v}, \mathbf{u}_i\rangle}{\|\mathbf{v}\| \|\mathbf{u}_i\|}=\frac{\langle\mathbf{v}, \mathbf{u}_i\rangle}{\|\mathbf{v}\| } && \text{since $\|\mathbf{u}_i\|=1$.}
\end{align*}
It follows that
\begin{align*}
\cos ^2\theta_1+\cdots+\cos^2 \theta_n &=\frac{\langle\mathbf{v}, \mathbf{u}_1\rangle^2}{\|\mathbf{v}\|^2 }+\cdots+\frac{\langle\mathbf{v}, \mathbf{u}_n\rangle^2}{\|\mathbf{v}\|^2 }\6pt] &=\frac{1}{\|\mathbf{v}\|^2}(a_1^2+\cdots a_n^2) &&\text{by (**)}\\[6pt] &=\frac{1}{\|\mathbf{v}\|^2}\cdot \|\mathbf{v}\|^2 &&\text{by (*)}\\[6pt] &=1. \end{align*} Thus we obtain \[\cos ^2\theta_1+\cdots+\cos^2 \theta_n=1 as required.

### More from my site

• The Rotation Matrix is an Orthogonal Transformation Let $\mathbb{R}^2$ be the vector space of size-2 column vectors. This vector space has an inner product defined by $\langle \mathbf{v} , \mathbf{w} \rangle = \mathbf{v}^\trans \mathbf{w}$. A linear transformation $T : \R^2 \rightarrow \R^2$ is called an orthogonal transformation if […]
• Unit Vectors and Idempotent Matrices A square matrix $A$ is called idempotent if $A^2=A$. (a) Let $\mathbf{u}$ be a vector in $\R^n$ with length $1$. Define the matrix $P$ to be $P=\mathbf{u}\mathbf{u}^{\trans}$. Prove that $P$ is an idempotent matrix. (b) Suppose that $\mathbf{u}$ and $\mathbf{v}$ be […]
• The Inner Product on $\R^2$ induced by a Positive Definite Matrix and Gram-Schmidt Orthogonalization Consider the $2\times 2$ real matrix $A=\begin{bmatrix} 1 & 1\\ 1& 3 \end{bmatrix}.$ (a) Prove that the matrix $A$ is positive definite. (b) Since $A$ is positive definite by part (a), the formula $\langle \mathbf{x}, […] • Inner Product, Norm, and Orthogonal Vectors Let \mathbf{u}_1, \mathbf{u}_2, \mathbf{u}_3 are vectors in \R^n. Suppose that vectors \mathbf{u}_1, \mathbf{u}_2 are orthogonal and the norm of \mathbf{u}_2 is 4 and \mathbf{u}_2^{\trans}\mathbf{u}_3=7. Find the value of the real number a in […] • Find the Distance Between Two Vectors if the Lengths and the Dot Product are Given Let \mathbf{a} and \mathbf{b} be vectors in \R^n such that their length are \[\|\mathbf{a}\|=\|\mathbf{b}\|=1$ and the inner product $\mathbf{a}\cdot \mathbf{b}=\mathbf{a}^{\trans}\mathbf{b}=-\frac{1}{2}.$ Then determine the length $\|\mathbf{a}-\mathbf{b}\|$. (Note […]
• Inner Products, Lengths, and Distances of 3-Dimensional Real Vectors For this problem, use the real vectors $\mathbf{v}_1 = \begin{bmatrix} -1 \\ 0 \\ 2 \end{bmatrix} , \mathbf{v}_2 = \begin{bmatrix} 0 \\ 2 \\ -3 \end{bmatrix} , \mathbf{v}_3 = \begin{bmatrix} 2 \\ 2 \\ 3 \end{bmatrix} .$ Suppose that $\mathbf{v}_4$ is another vector which is […]
• Find the Inverse Matrix of a Matrix With Fractions Find the inverse matrix of the matrix $A=\begin{bmatrix} \frac{2}{7} & \frac{3}{7} & \frac{6}{7} \\[6 pt] \frac{6}{7} &\frac{2}{7} &-\frac{3}{7} \\[6pt] -\frac{3}{7} & \frac{6}{7} & -\frac{2}{7} \end{bmatrix}.$   Hint. You may use the augmented matrix […]
• Orthonormal Basis of Null Space and Row Space Let $A=\begin{bmatrix} 1 & 0 & 1 \\ 0 &1 &0 \end{bmatrix}$. (a) Find an orthonormal basis of the null space of $A$. (b) Find the rank of $A$. (c) Find an orthonormal basis of the row space of $A$. (The Ohio State University, Linear Algebra Exam […]

#### You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

##### Rotation Matrix in the Plane and its Eigenvalues and Eigenvectors

Consider the $2\times 2$ matrix $A=\begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta& \cos \theta \end{bmatrix},$ where $\theta$ is a...

Close