Welcome to our community

Be a part of something great, join today!

[SOLVED] Projection matrix

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Hey!! :eek:

We have the vectors $\displaystyle{a_k=\begin{pmatrix}\cos \frac{k\pi}{3} \\ \sin \frac{k\pi}{3}\end{pmatrix}, \ k=0, 1, \ldots , 6}$. Let $P_k$ be the projection matrix onto $a_k$.
Calculate $P_6P_5P_4P_3P_2P_1a_0$.


Are the elements of the projection matrix defined as $P_{ij}=\frac{a_ij_j}{a\cdot a}$ ? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,684
Hey!! :eek:

We have the vectors $\displaystyle{a_k=\begin{pmatrix}\cos \frac{k\pi}{3} \\ \sin \frac{k\pi}{3}\end{pmatrix}, \ k=0, 1, \ldots , 6}$. Let $P_k$ be the projection matrix onto $a_k$.
Calculate $P_6P_5P_4P_3P_2P_1a_0$.


Are the elements of the projection matrix defined as $P_{ij}=\frac{a_ij_j}{a\cdot a}$ ?
Hey mathmari !!

What do you mean by $a_ij_j$? (Wondering)

Btw, $a$ is of unit length isn't it? So $a\cdot a=1$. (Thinking)

The projection onto $a_k$ is:
$$P_k(x) = (x\cdot a_k)a_k = a_k(a_k^T x)=(a_k a_k^T)x$$
So the elements of the matrix $P_k$ are $(P_k)_{ij} = a_{k,i} a_{k,j}$.
Oh, is that what you meant? (Wondering)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
What do you mean by $a_ij_j$? (Wondering)

Btw, $a$ is of unit length isn't it? So $a\cdot a=1$. (Thinking)

The projection onto $a_k$ is:
$$P_k(x) = (x\cdot a_k)a_k = a_k(a_k^T x)=(a_k a_k^T)x$$
So the elements of the matrix $P_k$ are $(P_k)_{ij} = a_{k,i} a_{k,j}$.
Oh, is that what you meant? (Wondering)
Yes, that is what I meant, I didn't use the correct symbols. (Blush)


So we get the following:
\begin{align*}&P_1=\begin{pmatrix}\cos^2\frac{\pi}{3} & \sin\frac{\pi}{3}\cos\frac{\pi}{3} \\ \sin\frac{\pi}{3}\cos\frac{\pi}{3} & \sin^2\frac{\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_2=\begin{pmatrix}\cos^2\frac{2\pi}{3} & \sin\frac{2\pi}{3}\cos\frac{2\pi}{3} \\ \sin\frac{2\pi}{3}\cos\frac{2\pi}{3} & \sin^2\frac{2\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_3=\begin{pmatrix}\cos^2\frac{3\pi}{3} & \sin\frac{3\pi}{3}\cos\frac{3\pi}{3} \\ \sin\frac{3\pi}{3}\cos\frac{3\pi}{3} & \sin^2\frac{3\pi}{3} \end{pmatrix}=\begin{pmatrix}\cos^2\pi & \sin\pi\cos\pi \\ \sin\pi\cos\pi & \sin^2\pi \end{pmatrix}=\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix} \\ & P_4=\begin{pmatrix}\cos^2\frac{4\pi}{3} & \sin\frac{4\pi}{3}\cos\frac{4\pi}{3} \\ \sin\frac{4\pi}{3}\cos\frac{4\pi}{3} & \sin^2\frac{4\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_5=\begin{pmatrix}\cos^2\frac{5\pi}{3} & \sin\frac{5\pi}{3}\cos\frac{5\pi}{3} \\ \sin\frac{5\pi}{3}\cos\frac{5\pi}{3} & \sin^2\frac{5\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_6=\begin{pmatrix}\cos^2\frac{6\pi}{3} & \sin\frac{6\pi}{3}\cos\frac{6\pi}{3} \\ \sin\frac{6\pi}{3}\cos\frac{6\pi}{3} & \sin^2\frac{6\pi}{3} \end{pmatrix}=\begin{pmatrix}\cos^2\left (2\pi\right ) & \sin\left (2\pi\right )\cos\left (2\pi\right ) \\ \sin\left (2\pi\right )\cos\left (2\pi\right ) & \sin^2\left (2\pi\right ) \end{pmatrix}=\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\end{align*}

Therefore the result that we are looking for is:
\begin{align*}P_6P_5P_4P_3P_2P_1a_0&=\left (\left (\left (\left (\left (P_6P_5\right )P_4\right )P_3\right )P_2\right )P_1\right )a_0 \\ & = \begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\cos 0 \\ \sin 0\end{pmatrix} \\ & = \begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{8} & -\frac{\sqrt{3}}{8} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{8} & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{32} & \frac{\sqrt{3}}{32} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{64} & \frac{\sqrt{3}}{64} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{64} \\ 0\end{pmatrix}\end{align*}


(Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,684
So we get the following:
\begin{align*}&P_1=\begin{pmatrix}\cos^2\frac{\pi}{3} & \sin\frac{\pi}{3}\cos\frac{\pi}{3} \\ \sin\frac{\pi}{3}\cos\frac{\pi}{3} & \sin^2\frac{\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_2=\begin{pmatrix}\cos^2\frac{2\pi}{3} & \sin\frac{2\pi}{3}\cos\frac{2\pi}{3} \\ \sin\frac{2\pi}{3}\cos\frac{2\pi}{3} & \sin^2\frac{2\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_3=\begin{pmatrix}\cos^2\frac{3\pi}{3} & \sin\frac{3\pi}{3}\cos\frac{3\pi}{3} \\ \sin\frac{3\pi}{3}\cos\frac{3\pi}{3} & \sin^2\frac{3\pi}{3} \end{pmatrix}=\begin{pmatrix}\cos^2\pi & \sin\pi\cos\pi \\ \sin\pi\cos\pi & \sin^2\pi \end{pmatrix}=\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix} \\ & P_4=\begin{pmatrix}\cos^2\frac{4\pi}{3} & \sin\frac{4\pi}{3}\cos\frac{4\pi}{3} \\ \sin\frac{4\pi}{3}\cos\frac{4\pi}{3} & \sin^2\frac{4\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_5=\begin{pmatrix}\cos^2\frac{5\pi}{3} & \sin\frac{5\pi}{3}\cos\frac{5\pi}{3} \\ \sin\frac{5\pi}{3}\cos\frac{5\pi}{3} & \sin^2\frac{5\pi}{3} \end{pmatrix}=\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix} \\ & P_6=\begin{pmatrix}\cos^2\frac{6\pi}{3} & \sin\frac{6\pi}{3}\cos\frac{6\pi}{3} \\ \sin\frac{6\pi}{3}\cos\frac{6\pi}{3} & \sin^2\frac{6\pi}{3} \end{pmatrix}=\begin{pmatrix}\cos^2\left (2\pi\right ) & \sin\left (2\pi\right )\cos\left (2\pi\right ) \\ \sin\left (2\pi\right )\cos\left (2\pi\right ) & \sin^2\left (2\pi\right ) \end{pmatrix}=\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\end{align*}

Therefore the result that we are looking for is:
\begin{align*}P_6P_5P_4P_3P_2P_1a_0&=\left (\left (\left (\left (\left (P_6P_5\right )P_4\right )P_3\right )P_2\right )P_1\right )a_0 \\ & = \begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\cos 0 \\ \sin 0\end{pmatrix} \\ & = \begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{8} & -\frac{\sqrt{3}}{8} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{8} & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}-\frac{1}{32} & \frac{\sqrt{3}}{32} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}\frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{4} & \frac{3}{4} \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{64} & \frac{\sqrt{3}}{64} \\ 0 & 0 \end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}
\\ & = \begin{pmatrix}\frac{1}{64} \\ 0\end{pmatrix}\end{align*}
Looks all correct to me! (Nod)

Just a different possible approach:
$$P_6P_5P_4P_3P_2P_1a_0
= (a_6a_6^T)\ldots(a_2a_2^T)(a_1a_1^T)a_0
=a_6(a_6^Ta_5)\ldots(a_2^Ta_1)(a_1^Ta_0)
$$
Each pair of consecutive $a_k$ vectors corresponds to two unit vectors with an angle of $\frac\pi 3$ between them.
Their dot product is therefore $\cos\frac\pi 3$.
Thus:
$$P_6P_5P_4P_3P_2P_1a_0 = a_6(\cos\frac\pi 3)^6=\binom 10\cdot \frac 1{2^6} = \binom{\frac1{64}}0$$
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Looks all correct to me! (Nod)

Just a different possible approach:
$$P_6P_5P_4P_3P_2P_1a_0
= (a_6a_6^T)\ldots(a_2a_2^T)(a_1a_1^T)a_0
=a_6(a_6^Ta_5)\ldots(a_2^Ta_1)(a_1^Ta_0)
$$
Each pair of consecutive $a_k$ vectors corresponds to two unit vectors with an angle of $\frac\pi 3$ between them.
Their dot product is therefore $\cos\frac\pi 3$.
Thus:
$$P_6P_5P_4P_3P_2P_1a_0 = a_6(\cos\frac\pi 3)^6=\binom 10\cdot \frac 1{2^6} = \binom{\frac1{64}}0$$
Ahh ok! I see!! Thanks a lot!! (Blush)