Exercise 3.4.1.
Let \(T:\R^7\to\R^4\) be given by \(T(\xx)=A\xx\text{,}\) where
\begin{equation*}
A = \bbm 3\amp -4\amp 2\amp 0 \amp 1\amp 7\amp -5\\
-4\amp 7\amp 0\amp -3\amp 2 \amp 0\amp 1\\
0\amp 5\amp 8\amp -9\amp 10\amp 27\amp -19\\
2\amp 7\amp -3\amp 1\amp 5\amp 12\amp -9\ebm\text{.}
\end{equation*}
(a)
(b)
Extend the basis from part (a) to a basis of \(\R^7\text{.}\)
Suggestion: recall that you can extend to a basis by adding elements of the standard basis for \(\R^7\text{.}\)
Use the code cell below to enter a matrix you can use to confirm that your basis is, in fact, a basis.
Once your testing indicates that you have successfully found a basis, input your basis vectors below.
Suggestion: in part (a), you probably used the command
A.nullspace() to find the basis for \(\ker(T)\text{.}\) If you enter this asB1 = A.nullspace() B1
then you can use the name
B1 to recall those vectors, so you donβt have to input them manually. The object B1 is a list of vectors, and you can call elements of that list as B1[0], B1[1], etc..First, input the vectors that you added to
B1 to get a basis of \(\R^7\text{.}\) (For example, you might enter e1 = Matrix([1,0,0,0,0,0,0]).) Then define your basis as a list B. For example, you might enter B = (B1[0],B1[1],B1[2],e1,e2,e3,e4), if you found that there were three vectors in the list B1, and that the first 4 standard basis vectors were sufficient to get you a basis for \(\R^7\text{.}\) (This may not be what you find, of course.)
(c)
Use the Gram-Schmidt algorithm to create an orthogonal basis for \(\R^7\) from the basis \(B\text{.}\) You will want to give your basis a new name, so that you can reference its elements later.
(d)
Let \(U = \ker(T)\text{.}\) If \(\dim U = k\text{,}\) then the first \(k\) vectors of your orthogonal basis from \(\R^7\) form an orthogonal basis for \(U\text{,}\) according to the Gram-Schmidt theorem. Confirm that each of the remaining vectors in this basis are orthogonal to the vectors in the basis
B1.
It follows that the remaining vectors are elements of \(U^\bot\text{.}\) In fact, they form a basis. we know they are independent, because they are part of a basis for \(\R^7\text{.}\) And since \(\dim U+\dim U^\bot = \dim \R^7\text{,}\) we know we have the right number.
(e)
Given the vector \(\xx = (4,-1,6,3,8,2,5)\in\R^7\text{,}\) find a vector \(\mathbf{p}\in U=\ker(T)\) such that \(\len{\xx-\mathbf{p}}\) is as small as possible.
