Let \(W\) be a subspace of \(\R^n\text{.}\) Then for \(x\in \R^n\text{,}\) there exist unique \(w\in W\) and \(w'\in W^{\perp}\) such that \(x=w+w'\text{.}\)
In particualar \(\R^n=W+W^{\perp}\text{.}\) Since \(W\cap W^{\perp}=\{0\}\text{,}\) we have \(\R^n=W\oplus W^{\perp}\text{,}\) called the direct sum of \(W\) and \(W^{\perp}\text{.}\)
Let \(x\in W\text{,}\) then for all \(y\in W^\perp\text{,}\) we have \(y^Tx=0\text{.}\) That is \(x\in {(W^\perp)}^{\perp}\text{.}\) Hence \(W\subset {(W^\perp)}^{\perp}\text{.}\) To show \(W={(W^\perp)}^{\perp}\text{,}\) it is enough to show \(\dim{(W)}=\dim{({(W^\perp)}^{\perp})}\text{.}\)
Consider the plane \(\pi=\{(x,y,z)\in \R^3:3x+y-5z=0\}\text{.}\) It is easy to see that \(v_1=(2,-1,1),
v_2=(1,2,1)\) lie on the plane \(\pi\text{.}\) Using the Gram-Schmidt process we can find an orthogonal basis \(u_1 = (2,-1,1),
u_2=(2/3, 13/6, 5/6)\) on \(\pi\text{.}\) Let us find the orthogonal projection of \(v=(1,2,3)\) onto \(\pi\text{.}\) The required vector
How to find the orthogonal projection of a vector on to the subspace spanned by a set of vectors in \(\R^n\text{?}\) Let \(\beta = \{w_1,\ldots, w_k\}\) be a basis of \(W\text{.}\) We want to find the vector \(p\) which is the orthogonal projection of \(v\) onto \(W\text{.}\)
Let \(W\) be the subspace spanned by \(\{v_1,v_2,v_3,v_4\}\) in \(\mathbb{R}^5\text{.}\) Find the orthogonal projection of the vector \(u = \left(\begin{array}{r}
1 \\
3 \\
5 \\
7 \\
11
\end{array}\right)\) onto \(W\) in Sage.
Since pivots indices are \(\{0,1,3\}\text{,}\)\(v_1,v_2,v_4\) are linearly independent. We define a matrix \(M\) of whose columns are \(v_1,v_2,v_4\text{.}\) Then the orthogonal projection of \(u\) onto \(W\) is \(M(M^TM)^{-1}M^Tu\text{.}\)
Let \(A\) be an \(n\times n\) real matrix. Recall \({\cal R}(A)\) and \({\cal N}(A)\text{,}\) range or columns space of \(A\) and null or kernel of \(A\text{.}\) Then show that
\({\cal R}(A)^\perp={\cal N}(A^T)\) or \({\rm Col}(A)^\perp = {\rm null}(A^T)\text{.}\)
Let \(x \in {\cal R}(A)^\perp\text{.}\) Then for \(y\in \R^n\text{,}\)\(Ay\in {\cal R}(A)\text{.}\) Hence \(0=(Ay)^Tx=y^TA^Tx\text{.}\) This implies \(A^Tx=0\text{.}\) Hence \(x\in {\cal N}(A^T)\text{.}\) That is, \({\cal R}(A)^\perp\subseteq {\cal N}(A^T)\text{.}\)
Next let \(x\in {\cal N}(A^T)\) then \((Ay)^Tx=y^TA^Tx=0\) for all \(y\text{.}\) Hence \(x\in {\cal R}(A)^\perp\text{.}\) That is, \({\cal N}(A^T) \subseteq {\cal R}(A)^\perp\text{.}\) Hence \({\cal R}(A)^\perp={\cal N}(A^T)\text{.}\)
Hence if \(Ax=0\text{,}\) then \(r_i\cdot x=0\) for all \(i\text{.}\) This implies \(x\in {\rm Row}(A)^\perp\text{.}\) That is \({\rm null}(A)\subset {\rm Row}(A)^\perp \text{.}\)
If \(y\in {\rm Row}(A)^\perp\text{,}\) then \(r_i\cdot y=0\) for all \(i\text{.}\) Hence \(Ay=0\text{.}\) This implies \(y\in {\rm null}(A)\text{.}\) That is, \({\rm Row}(A)^\perp\subset {\rm null}(A)\text{.}\) Hence \({\rm Row}(A)^\perp = {\rm null}(A)\text{.}\)
Let \(A\) be an \(n\times n\) real symmetric matrix and \(W\text{,}\) a \(A\)-invariant subspace of \(\R^n\text{.}\) Then show that \(W^\perp\) is \(A\)-invariant.
The above result is not true if \(A\) is not a symmetric matrix. Consider \(A=\begin{pmatrix}1 \amp 1\amp -1\\-1 \amp 1 \amp 0\\0 \amp 0 \amp 1\end{pmatrix}\text{.}\) Then it is easy to check that \(W\text{,}\)\(xy\)-plane is \(A\)-invariant and \(W^\perp =\R e_3\text{.}\) But \(W^\perp\) is not \(A\)-invariant.
In this subsection, we deal with two concepts, orthogonla projection of a vector onto a hyperplane in \(\mathbb{R}^n\) and reflection of a vector about a hyperplane.
where \(a\) is a nonzero vector in \(\mathbb{R}^n\) and \(b\in \mathbb{R}\text{.}\) If \(b=0\text{,}\) then \(H\) is an \(n-1\)-dimensiional subspace of of \(\mathbb{R}^n\text{.}\)
Note that if \(H\) is an \(n-1\)-dimensiional subspace of of \(\mathbb{R}^n\text{,}\) defined by \(a\text{,}\) let us denote it by \(H_a\text{,}\) then \(a\) is orthogonal to \(H\text{.}\)
How to find the orthogonal projection of a vector \(v\in \mathbb{R}^n\) onto \(H_a\text{?}\) Note that we have already done one way by finding a basis vector of \(H_a\text{.}\) We would like to get a formula in terms of \(a\text{.}\) If \(v_{H_a}\) is the orthogonal projection of \(v\) onto \(H_a\text{,}\) then it can be obianed by taking out the orthogonal prjection of \(v\) onto the vector \(a\) from \(v\text{.}\) Thus we have
How do we obtain \(v_H\text{,}\) the orthogonal projection of \(v\) onto \(H\text{?}\) Note that \(v-v_H\) is parallel to \(a\text{.}\) Hence \(v-v_H=ta\) for some scalar \(t\text{.}\) Since \(v_H=v-ta\in H\text{,}\) we have \(a^T(v-ta)=b\text{.}\) Simplyfying we get
Next we wish to find the reflection of a vector \(v\) about the hyperplane \(H\text{.}\) Suppose \(v_R\) is the projection of \(v\) about \(H\text{,}\) then \(v_R\) can be obtained by going the same distance on the opposite side along the vector \(v-v_H\text{.}\) Thus
Plottig orthogonal projection and reclection in \(\mathbb{R}^3\)
Use sage to plot the hyperplane \(H\) defined by the equation \(3x-2y+z=2\) and also plot the vector \(v=(1,-1,3)\) and its orthogonal projection \(v_H\) and the reflection \(v_R\) about \(H\text{.}\)