I'm trying to figure this one out guys with no luck.

Give the standard matrix of the projection $$ T:\Bbb R^3 \to \Bbb R^3 $$ that projects a vector on the plane $x+y+z=0.$

I tried to make a basis $B$, for instance $(-1,0,1)$ and $(0,1,-1)$ then make them orthogonal using Gram-Schmidt, then make the projection $$\frac{(x,y,z) \cdot (-1,0,1)}{(-1,0,1)\cdot(-1,0,1)} + \frac{(x,y,z) \cdot (0,1,-1)}{(0,1,-1)\cdot(0,1,-1)}$$ After this I'm lost

I'm taking a linear algebra course, so an answer in that field would be much appreciated prefferably using the method I used. Thanks in advance!

  • 2
    $\begingroup$ Welcome to MSE. Can you tell us what you've tried so far? Can you tell us how you would compute $T(e_1)$, for instance? You can edit your question by clicking on "edit", just below the question. Also, I'm going to make your math look prettier by using MathJax, so that you can start to see how it's done. $\endgroup$ Feb 2 '19 at 15:03
  • 1
    $\begingroup$ I tried to make a basis B, for instance (-1,0,1) and (0,1,-1) then make them orthogonal using gram schmidt then make the projection ((x,y,z) dot (-1,0,1))/((-1,0,1)dot(-1,0,1)) + ((x,y,z) dot (0,1,-1))/((0,1,-1)dot(-1,0,1)) After this I'm lost $\endgroup$
    – Zeki555
    Feb 2 '19 at 15:10
  • $\begingroup$ The last dot is (0,1,-1) offcourse $\endgroup$
    – Zeki555
    Feb 2 '19 at 15:19
  • $\begingroup$ Presumably by “projection” you mean orthogonal projection. You need to project onto the orthogonal basis vectors that you computed via G-S, not onto the original basis that you picked. Even easier is to compute the projection onto the orthogonal complement (only one vector involved, so no G-S required) and then subtract that from the identity. $\endgroup$
    – amd
    Feb 2 '19 at 21:24

Let $\theta_{\mathbf{u},\mathbf{v}}$ be the smallest angle between $\mathbf{u}$ and $\mathbf{v}$. Define the ortogonal projection of a vector $\mathbf{u}$ over a vector $\mathbf{v}$ as:

$$ {Pr}_{\mathbf{v}}(\mathbf{u})= \frac{\vert\vert\mathbf{u}\vert\vert\cdot\cos\left(\theta_{\mathbf{u},\mathbf{v}}\right)}{\vert\vert\mathbf{v}\vert\vert}\frac{\mathbf{v}}{\vert\vert\mathbf{v}\vert\vert}$$ also $$ \langle \mathbf{u},\mathbf{v} \rangle = \vert\vert\mathbf{u}\vert\vert\cdot\vert\vert\mathbf{v}\vert\vert\cdot\cos\left(\theta_{\mathbf{u},\mathbf{v}}\right)$$ $$ \langle \mathbf{v},\mathbf{v}\rangle= \vert\vert\mathbf{v}\vert\vert^{2}$$ then $${Pr}_{\mathbf{v}}(\mathbf{u})=\frac{\langle \mathbf{u},\mathbf{v}\rangle}{\langle \mathbf{v},\mathbf{v}\rangle}\mathbf{v}$$

Take $u=(x,y,z)$ and $v=(1,1,1)$ the normal vector of the plane $x+y+z=0$. So, the linear projection $T$ will be


$$ \langle \mathbf{u}, \mathbf{v}\rangle = x+y+z.$$ $$ \langle \mathbf{v},\mathbf{v} \rangle = \vert\vert\mathbf{v} \vert\vert^{2}=3.$$ Then $$ T(x,y,z) = (x,y,z) - \frac{(x+y+z)}{3}(1,1,1) =\left(\frac{2x-y-z}{3},\frac{2y-x-z}{3},\frac{2z-x-y}{3}\right)$$ So your matrix is $$ A = \frac{1}{3}\left[ \begin{array}{ccc} 2&-1&-1\\ -1&2&-1\\ -1&-1&2 \end{array} \right]$$ You can check that $A^{2}=A$. Also, you can check that $T(1,1,1)=(0,0,0)$, that is, $$ \mathrm{ker}(T)=\mathrm{span}\{(1,1,1)\} $$ and $$\mathrm{Im}(T)=\{(x,y,z)\in\mathbb{R}^{3}\ :\ x+y+z=0\}$$ (your initial plane).

Recall that:

The vector $\mathbf{w} = \mathbf{u} - Pr_{\mathbf{v}}(\mathbf{u})$ will satisfy $\langle \mathbf{w},\mathbf{v}\rangle=0.$

  • $\begingroup$ Thanks a lot Hector, I'm just confused with this step T(u):=u−Prv(u). In my textbook it says Prv(u)=(⟨u,v_1⟩/⟨v_1,v⟩)v_1 + Prv(u)=(⟨u,v_2⟩/⟨v_2,v_2⟩)v_2 $\endgroup$
    – Zeki555
    Feb 2 '19 at 16:42
  • $\begingroup$ I made an update for you to clarify. $\endgroup$ Feb 2 '19 at 16:42
  • $\begingroup$ The formula from your textbook is right. $\endgroup$ Feb 2 '19 at 16:48
  • $\begingroup$ You can solve it using your textbook formula or using directly the way I used in my answer. $\endgroup$ Feb 2 '19 at 16:49
  • 1
    $\begingroup$ Hector, your $A$ is missing a minus sign in position 1,3. It should be symmetric... $\endgroup$
    – Will Jagy
    Feb 2 '19 at 19:13

Partial answer, to push you along in the direction you were going.

Finding a basis for the plane you're projecting to is a good idea. You started with $$ u_1 = \pmatrix{-1\\0\\1} , u_2 = \pmatrix{0 \\ 1 \\ -1} $$ and then wanted to apply Gram-Schmidt. Normalizing the first gives you $$ v_1 = \pmatrix{-s\\0\\s} , u_2 = \pmatrix{0 \\ 1 \\ -1} $$ where $s = \frac{\sqrt{2}}{2}$. The problem is that the dot product with the second is not zero, so you don't have perpendicular vectors. The dot product is ... $-s$.

The idea in G-S is to alter $u_2$, by adding some multiple of $v_1$, until the result is perpendicular to $v_1$. In other words, you want to find a number $b$ with $$ (u_2 + b v_1) \cdot v_1 = 0. $$ That turns into \begin{align} u_2 \cdot v_1 + b (v_1 \cdot v_1) &= 0 \\ -s + b (1) &= 0 \\ \end{align} so $b = s$. So we compute \begin{align} u_2 + s v_1 &= \pmatrix{0\\1\\-1} + s \pmatrix {-s\\0\\s} \\ &= \pmatrix{-s^2\\1\\-1+s^2}\\ &= \pmatrix{-\frac12\\1\\-\frac12}, \end{align} which you can see is orthogonal to $v_1$. But this isn't quite the final step. That vector we found wasn't a unit vector (i.e., its length was not $1$). In fact, its length is $\sqrt{1^2 + (\frac12)^2 + (\frac12)^2} = \sqrt{\frac{3}{2}} = \frac{\sqrt{3}}{s}$. We need to divide the vector by this length to get the unit vector $v_2$: \begin{align} v_2 &= \pmatrix{-\frac12\\1\\-\frac12} / (\frac{\sqrt{3}}{s}) \\ &= \frac{s}{\sqrt{3}}\pmatrix{-\frac12\\1\\-\frac12}\\ \end{align}

Whew! So now we have an orthonormal basis for the plane we're projecting on. We can extend it to an orthonomal basis for all of 3-space by adding in $\pmatrix{1\\1\\1}$...almost. That vector isn't a unit vector, so we have to add in $$ v_3 = \frac{1}{\sqrt{3}}\pmatrix{1\\1\\1} $$

Now you have an orthonormal basis $v_1, v_2, v_3$ for $3$-space, where the first two vectors span the plane that you want to project onto.

Can you do anything with this?

  • $\begingroup$ Thanks John! But this is actually the part where I get stuck, I know I should make a base and I also know how to apply Gram Schmidt, but then I'm lost. It's the projection that throws me off, it should also be a standard matrix for all vectors projecting on to that plane. $\endgroup$
    – Zeki555
    Feb 2 '19 at 16:08

You can obtain the matrix w.r.t. the canonical basis in a simpler way:

Let $n=(1,1,1)$ be a normal vector of the plane $\Pi:\;x+y+z=0$. For any point $M=(x,y,z)\in\mathbf R^3$, its orthogonal projection on $\pi$ is defined by the value of the parameter $t$ such that $M+tn$ satisfies the equation of $\Pi$, i.e. $$ (x+t)+(y+t)+(z+t)=0. $$ Can you proceed?

Some details:

The latter equation yields the value of $\:t=-\frac13(x+y+z)$, and the point $T(M)=M+tn$ has coordinates: \begin{cases} x'=x+t=\tfrac13(2x-y-z),\\ y'=y+t=\tfrac13(-x+2y-z),\\ z'=z+t=\tfrac13(-x-y+2z). \end{cases} It is now easy to deduce the matrix of T in the canonical basis.

  • $\begingroup$ It's my first contact with linear algebra, we only learned to make projections like I did above, so no I wouldn't know what to do with your suggestion. $\endgroup$
    – Zeki555
    Feb 2 '19 at 15:38
  • $\begingroup$ It's only high-school geometry… $\endgroup$
    – Bernard
    Feb 2 '19 at 15:53
  • $\begingroup$ I understand that it's geometry Bernard, I still don't know how to use your suggestion though. I forgot to clarify that I'm taking a linear algebra course, so an answer in that field would be much appreciated prefferably using the method I used, since that's the way it's taught to me. Sorry for the confusement. $\endgroup$
    – Zeki555
    Feb 2 '19 at 16:01
  • $\begingroup$ I'll post some details in a moment. $\endgroup$
    – Bernard
    Feb 2 '19 at 16:02
  • $\begingroup$ Thanks for the geometric approach Bernard, much appreciated! $\endgroup$
    – Zeki555
    Feb 2 '19 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.