First, letβs find two vectors in the plane, called \(P\text{,}\) that form an orthogonal basis (we will see why itβs helpful to have an orthogonal basis later). Recall that a normal vector to the plane is given by the vector \([1,2,3]^T\text{.}\) Two vector that are normal to it is \(\vec{u}_1=[3,0,-1]\) and \(\vec{u}_2=[0,-3,2]^T\text{.}\) (Note: these are two points in the plane). To form an orthonormal basis, we need to perform Gramm-Schmidt.
\begin{align*}
\vec{v}_1 \amp = \vec{u}_1
\amp \vec{v}_2 \amp= \vec{u}_2 - \frac{\langle \vec{v}_1,\vec{u}_2 \rangle}{\langle \vec{v}_1, \vec{v}_1 \rangle} \vec{v}_1 \\
\amp = \begin{bmatrix}
3 \\ 0 \\ -1
\end{bmatrix}\amp
\vec{v}_2 \amp = \begin{bmatrix}
0 \\ -3 \\ 2
\end{bmatrix} - \biggl(-\frac{1}{5}\biggr)
\begin{bmatrix}
3 \\ 0 \\ -1
\end{bmatrix} \\
\amp\amp\amp =
\begin{bmatrix}
3/5 \\ -3 \\ 9/5
\end{bmatrix}
\end{align*}
and to make the second vector nicer, weβll multiply by \(5/3\text{.}\) An orthogonal set in the plane is
\begin{equation*}
\left\{ \begin{bmatrix}
3 \\ 0 \\ -1
\end{bmatrix} , \begin{bmatrix}
1 \\ -5 \\ 3
\end{bmatrix} \right \}
\end{equation*}
To consider how to project the vector \(\vec{u} = [6,-2,3]^{\intercal}\) into the plane we will write
\begin{equation*}
\vec{u} = \vec{u}_{\perp} + \vec{u}_{||}
\end{equation*}
where \(\vec{u}_{\perp}\) is orthogonal to both \(\vec{v}_1\) and \(\vec{v}_2\) and we can write
\begin{equation*}
\text{Proj}_{P}\vec{u} = \vec{u}_{||} = c_1 \vec{v}_1 + c_2 \vec{v}_2
\end{equation*}
So we next take the inner product of \(\vec{u}\) with both \(\vec{v}_1\) and \(\vec{v}_2\text{.}\)
\begin{align*}
\langle \vec{u}, \vec{v}_1 \rangle \amp = \langle \vec{u}_{\perp} + \vec{u}_{||}, \vec{v}_1 \rangle \amp
\langle \vec{u}, \vec{v}_2 \rangle \amp = \langle \vec{u}_{\perp} + \vec{u}_{||}, \vec{v}_2 \rangle \\
\amp = \langle \vec{u}_{\perp}, \vec{v}_1 \rangle + \langle \vec{u}_{||}, \vec{v}_1 \rangle \amp
\amp = \langle \vec{u}_{\perp}, \vec{v}_2 \rangle + \langle \vec{u}_{||}, \vec{v}_2 \rangle \\
\amp = 0 + \langle c_1 \vec{v}_1 + c_2 \vec{v}_2 ,\vec{v}_1 \rangle \amp
\amp = 0 + \langle c_1 \vec{v}_1 + c_2 \vec{v}_2 ,\vec{v}_2 \rangle \\
\amp = c_1 \langle \vec{v}_1, \vec{v}_1 \rangle + c_2 \langle \vec{v}_2, \vec{v}_1 \rangle \amp
\amp = c_1 \langle \vec{v}_1, \vec{v}_2 \rangle + c_2 \langle \vec{v}_2, \vec{v}_2 \rangle \\
\amp = c_1 \langle \vec{v}_1, \vec{v}_1 \rangle + 0 \amp
\amp = 0 + c_2 \langle \vec{v}_2, \vec{v}_1 \rangle
\end{align*}
Therefore
\begin{align*}
c_1 \amp = \frac{\langle \vec{u},\vec{v}_1 \rangle}{\langle \vec{v}_1, \vec{v}_1 \rangle} \amp
c_2 \amp = \frac{\langle \vec{u},\vec{v}_2 \rangle}{\langle \vec{v}_2, \vec{v}_2 \rangle}
\end{align*}
So in the case of projecting a vector onto a plane, \(P\text{,}\)
\begin{align*}
\text{Proj}_{P} \vec{u} \amp = c_1 \vec{v}_1 + c_2 \vec{v}_2 \\
\amp = \frac{\langle \vec{u},\vec{v}_1 \rangle}{\langle \vec{v}_1, \vec{v}_1 \rangle} \vec{v}_1 +
\frac{\langle \vec{u},\vec{v}_2 \rangle}{\langle \vec{v}_2, \vec{v}_2 \rangle} \vec{v}_2 \\
\amp = \frac{15}{10} \begin{bmatrix}
3 \\ 0 \\ -1
\end{bmatrix} + \frac{25}{35} \begin{bmatrix}
1 \\ -5 \\ 3
\end{bmatrix} = \frac{1}{14}\begin{bmatrix}
73 \\ -50 \\ 9
\end{bmatrix}
\end{align*}
So the vector \(\frac{1}{14} [73,-50,9]^{\intercal}\) is the projection of the vector \([6,-2,3]^{\intercal}\) onto the plane \(x+2y+3z=0\text{.}\)