Standard Matrix

106 Views Asked by At

During an exam, we were asked to determine the standard matrix of the linear image, $P: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ which projects a vector onto the $y=-x$ axis.

What I did is, I took the unit vector in the direction of the $y=-x$ axis, which is $\begin{bmatrix} 1 \\ -1 \end{bmatrix}$. Then I used the general formula for vector projection, using an arbitrary vector $\vec{x}$, with entries $x_1$ and $x_2$. In the answers model, they give that:

$ \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}$

A standard matrix is for projection. So is what I did unnecessarily difficult, or just wrong? In fact, I came up with:

$ \begin{bmatrix} \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & \frac{1}{2} \end{bmatrix}$

After all, I now don't see how my answer matches theirs, if it were right, which I would think? What else is wrong with my approach?

3

There are 3 best solutions below

1
On

Your "unit vector" isn't a unit vector, but your matrix is very much correct (the bottom one) for the question given. Their matrix is a reflection about the $x$-axis, mapping $y\mapsto-y$.

Notice also that their matrix has two linearly independent columns while yours has one linearly independent column, meaning your matrix has rank $1$, and theirs has rank $2$, meaning theirs isn't projection.

2
On

A systematic way to get the standard matrix $B_L$ for a linear transformation $L:X \to Y$ is to apply $L$ to the standard basis for $X$.

For $X=Y=\mathbb{R^2}$ we have unit direction vector $\hat n=\left[\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}}\right]$ and standard vectors $e_x=[1,0],e_j=[0,1]$.

For a vector $x \in X$ we have $$L(x) = \langle x,\hat n \rangle \hat n \;\in Y$$

$$e_x \to \left[\frac{1}{2}, -\frac{1}{2}\right]^T, e_y \to \left[-\frac{1}{2},\frac{1}{2}\right]^T \implies B_L = \begin{bmatrix}\frac{1}{2} & -\frac{1}{2}\\-\frac{1}{2} & \frac{1}{2}\end{bmatrix}$$

Which, as pointed out in the other answer, has rank 1 since you are projecting onto a proper subspace of $\mathbb{R^2}$

2
On

I will make some observations that can complement the ones already made.

What I did is, I took the unit vector in the direction of the $y=-x$ axis, which is $\begin{bmatrix} 1 \\ -1 \end{bmatrix}$.

As @Localth already pointed out in their response, this is not true, because $\|\begin{bmatrix}1\\-1\end{bmatrix} \|=\sqrt{(1)^{2}+(-1)^{2}}=\sqrt{2}\not=1$ which it is not a unit vector. Perhaps what you mean is: $\frac{1}{\sqrt{2}}\begin{bmatrix} 1\\-1\end{bmatrix}$ is a unit vector.

In the answers model, they give that:$ \begin{bmatrix}1 & 0 \\0 & -1 \end{bmatrix}$. A standard matrix is for projection.

For a square matrix $P$ to be a projection matrix, it must satisfy $P^{2}=P$. However, in this case, $\begin{bmatrix}1 & 0 \\0 & -1 \end{bmatrix}^{2}=\begin{bmatrix} 1&0\\0&1\end{bmatrix}\neq\begin{bmatrix}1&0\\0&-1\end{bmatrix}$, so it is not a projection matrix.

So is what I did unnecessarily difficult, or just wrong? In fact, I came up with: $ \begin{bmatrix} \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & \frac{1}{2} \end{bmatrix}$

Your answer is correct, as already indicated in the other responses and pointed out by @User5678. To complement what has already been said, one way to obtain the projection matrix onto a line through $v$ (projection onto a one-dimensional subspace) is by calculating $\displaystyle P=\frac{vv^{\top}}{v^{\top}v}$. In this case, the projection is onto the line through $v=(1,-1)$. So, $$P=\frac{1}{\begin{bmatrix} 1 & -1\end{bmatrix} \begin{bmatrix}1\\-1\end{bmatrix}}\begin{bmatrix}1\\-1\end{bmatrix} \begin{bmatrix}1&-1\end{bmatrix}=\frac{1}{2}\begin{bmatrix}1&-1\\-1&1\end{bmatrix}=\begin{bmatrix} \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & \frac{1}{2} \end{bmatrix}$$ which is exactly what you obtained. Furthermore, $P^{2}=P$ with rank one, as you can verify. Moreover, I believe this answers the following.

After all, I now don't see how my answer matches theirs, if it were right, which I would think? What else is wrong with my approach?

In any case, you should keep in mind (in problems in general) that a matrix "can have a different appearance" if you change the basis you are working with. In other words, matrices can have different representations in terms of different bases.