Projection of vector x in subspace L

36 Views Asked by At

Given vector $x$ in Euclidean space and $L$ is a subspace of the Euclidean space and the basis $a$ = {$a_{1}$,$a_{2}$} in $L$ where $x$, $a_{1}$ and $a_{2}$ are the following:

$x=\begin{pmatrix} 3\\ 4 \end{pmatrix}$

$a_{1}=\begin{pmatrix} 0\\ -1 \end{pmatrix}$

$a_{2}=\begin{pmatrix} 2\\ 1 \end{pmatrix}$

The approach followed for the above formulation was by making a basis matrix i.e. $A$ as:

$A=\begin{pmatrix} 0 & 2\\ -1 & 1 \end{pmatrix}$

The projection matrix was found by the following formula:

$P=A(A^{T}A)^{-1}A^{T}$

Plugging in the values, $P$ came out to be:

$P=\begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix}$

Thus for getting the projection of $x$ in subspace $L$, multiply the projection matrix i.e. $P$ with $x$.
But the answer coming is not correct. Can you please let me know where it is going wrong in the above approach?