Recap: Linear Independence and Linear Transformations
A short review of the two topics of the week. Each worked question is followed by an exercise of the same type. Exercises are for self-check; they are not graded.
1. Deciding linear independence
Before row reducing, look for a shortcut. Four of the five parts below have one; only the last needs the full computation.
Decide whether each set is linearly independent or linearly dependent.
(a) \(\begin{bmatrix}2\\-1\\3\end{bmatrix},\ \begin{bmatrix}0\\0\\0\end{bmatrix},\ \begin{bmatrix}5\\4\\1\end{bmatrix}\)
(b) \(\begin{bmatrix}1\\2\end{bmatrix},\ \begin{bmatrix}3\\-1\end{bmatrix},\ \begin{bmatrix}4\\4\end{bmatrix}\)
(c) \(\begin{bmatrix}2\\-4\\6\end{bmatrix},\ \begin{bmatrix}-3\\6\\-9\end{bmatrix}\)
(d) \(\begin{bmatrix}1\\2\\3\end{bmatrix},\ \begin{bmatrix}0\\4\\5\end{bmatrix},\ \begin{bmatrix}0\\0\\6\end{bmatrix}\)
(e) \(\begin{bmatrix}1\\-2\\3\end{bmatrix},\ \begin{bmatrix}2\\-3\\5\end{bmatrix},\ \begin{bmatrix}-1\\3\\-4\end{bmatrix}\)
Solution.
(a) Dependent. zero vector A set that contains \(\mathbf 0\) is always dependent: \(0\mathbf v_1+1\cdot\mathbf 0+0\mathbf v_3=\mathbf 0\) uses a nonzero weight.
(b) Dependent. too many vectors Three vectors in \(\mathbb R^2\): more vectors than entries, so the \(2\times3\) matrix has at most two pivots and a free variable.
(c) Dependent. multiple Two vectors: check the ratios \(-3/2,\ 6/(-4),\ -9/6\). All equal \(-\tfrac32\), so \(\mathbf v_2=-\tfrac32\mathbf v_1\).
(d) Independent. triangular pattern Suppose \(c_1\mathbf v_1+c_2\mathbf v_2+c_3\mathbf v_3=\mathbf 0\). The first entries give \(c_1\cdot1+c_2\cdot0+c_3\cdot0=0\), so \(c_1=0\). The second entries then give \(4c_2=0\), so \(c_2=0\). The third entries give \(6c_3=0\), so \(c_3=0\). Only the trivial solution: independent. This works whenever the vectors, written as columns, form a triangular matrix with nonzero diagonal entries; no row reduction is needed.
(e) Dependent. long way No shortcut applies: three vectors in \(\mathbb R^3\), none a multiple of another, no zeros. Row reduce \([\mathbf v_1\ \mathbf v_2\ \mathbf v_3]\): \(R_2\to R_2+2R_1\), \(R_3\to R_3-3R_1\), then \(R_3\to R_3+R_2\), then \(R_1\to R_1-2R_2\):
\[\begin{bmatrix}1&2&-1\\-2&-3&3\\3&5&-4\end{bmatrix}\sim\begin{bmatrix}1&2&-1\\0&1&1\\0&-1&-1\end{bmatrix}\sim\begin{bmatrix}1&2&-1\\0&1&1\\0&0&0\end{bmatrix}\sim\begin{bmatrix}1&0&-3\\0&1&1\\0&0&0\end{bmatrix}\]Column 3 has no pivot, so the set is dependent. From \(x_1=3x_3\), \(x_2=-x_3\) with \(x_3=1\): \(3\mathbf v_1-\mathbf v_2+\mathbf v_3=\mathbf 0\). Check: \(3-2-1=0\), \(-6+3+3=0\), \(9-5-4=0\).
2. Linear transformations
2.1 From a matrix to the general formula
For \(T(\mathbf x)=A\mathbf x\), multiply \(A\) by the column \(\begin{bmatrix}x_1\\\vdots\\x_n\end{bmatrix}\). Row \(i\) of \(A\) gives component \(i\) of \(T(\mathbf x)\): the entries of the row are the coefficients of \(x_1,\dots,x_n\). In the other direction, the coefficients in the formula are the rows of \(A\).
(a) Let \(A=\begin{bmatrix}2&-1&0\\3&0&5\end{bmatrix}\). Write a formula for \(T\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=A\mathbf x\).
(b) Let \(T\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}4x_1-x_2\\x_2\\-x_1+3x_2\end{bmatrix}\). Find the matrix \(A\) with \(T(\mathbf x)=A\mathbf x\).
Solution.
(a) \(A\mathbf x=\begin{bmatrix}2x_1-x_2+0x_3\\3x_1+0x_2+5x_3\end{bmatrix}\), so \(T\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=\begin{bmatrix}2x_1-x_2\\3x_1+5x_3\end{bmatrix}\). Here \(T:\mathbb R^3\to\mathbb R^2\).
(b) Read the coefficients of \(x_1,x_2\) in each component as a row: \(A=\begin{bmatrix}4&-1\\0&1\\-1&3\end{bmatrix}\). Check: \(A\mathbf x=\begin{bmatrix}4x_1-x_2\\x_2\\-x_1+3x_2\end{bmatrix}\).
2.2 Is a given map linear?
1. Compute \(T(\mathbf 0)\). If it is not \(\mathbf 0\), \(T\) is not linear. Done.
2. If every component of \(T(\mathbf x)\) is a sum of terms of the form (constant)\(\cdot x_i\), then \(T(\mathbf x)=A\mathbf x\) for the matrix of coefficients, so \(T\) is linear.
3. Otherwise (a product \(x_1x_2\), a square, an absolute value, a constant term), find one specific \(\mathbf u\) and scalar \(c\) with \(T(c\mathbf u)\ne cT(\mathbf u)\), or specific \(\mathbf u,\mathbf v\) with \(T(\mathbf u+\mathbf v)\ne T(\mathbf u)+T(\mathbf v)\).
Decide whether each map is linear.
(a) \(T\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}x_1+2\\x_2\end{bmatrix}\)
(b) \(T\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}x_1x_2\\x_1\end{bmatrix}\)
(c) \(T\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}3x_1-x_2\\x_1\end{bmatrix}\)
Solution.
(a) Not linear: \(T\begin{bmatrix}0\\0\end{bmatrix}=\begin{bmatrix}2\\0\end{bmatrix}\ne\begin{bmatrix}0\\0\end{bmatrix}\).
(b) \(T\begin{bmatrix}0\\0\end{bmatrix}=\begin{bmatrix}0\\0\end{bmatrix}\), so step 1 does not decide. The product \(x_1x_2\) is suspicious; test scaling with \(\mathbf u=\begin{bmatrix}1\\1\end{bmatrix}\), \(c=2\): \(T\begin{bmatrix}2\\2\end{bmatrix}=\begin{bmatrix}4\\2\end{bmatrix}\) but \(2T\begin{bmatrix}1\\1\end{bmatrix}=2\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}2\\2\end{bmatrix}\). Not linear.
(c) Both components are sums of constant times \(x_i\): \(T(\mathbf x)=\begin{bmatrix}3&-1\\1&0\end{bmatrix}\mathbf x\). Linear.
2.3 Computing images of a linear map
Notation: \(\mathbf e_1,\dots,\mathbf e_n\) are the vectors in \(\mathbb R^n\) with a single \(1\) and zeros elsewhere; \(\mathbf e_i\) has its \(1\) in position \(i\). In \(\mathbb R^2\), \(\mathbf e_1=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf e_2=\begin{bmatrix}0\\1\end{bmatrix}\). Every vector is a combination of them with its own entries as weights:
\[\mathbf x=\begin{bmatrix}x_1\\x_2\end{bmatrix}=x_1\begin{bmatrix}1\\0\end{bmatrix}+x_2\begin{bmatrix}0\\1\end{bmatrix}=x_1\mathbf e_1+x_2\mathbf e_2,\]and in general \(\mathbf x=x_1\mathbf e_1+\cdots+x_n\mathbf e_n\). (These vectors did not appear in the lecture; they are the columns of the identity matrix.)
Depending on what is given:
1. A matrix or a formula: compute \(A\mathbf x\) directly.
2. The images of \(\mathbf e_1,\dots,\mathbf e_n\): since \(\mathbf x=x_1\mathbf e_1+\cdots+x_n\mathbf e_n\), linearity gives \(T(\mathbf x)=x_1T(\mathbf e_1)+\cdots+x_nT(\mathbf e_n)\). For example, if \(T(\mathbf e_1)\) and \(T(\mathbf e_2)\) are known, then \(T\begin{bmatrix}3\\-2\end{bmatrix}=3T(\mathbf e_1)-2T(\mathbf e_2)\).
3. The images of other vectors \(\mathbf u,\mathbf v\): first solve \(\mathbf x=a\mathbf u+b\mathbf v\) for \(a,b\) (a small linear system), then \(T(\mathbf x)=aT(\mathbf u)+bT(\mathbf v)\).
A linear map \(T:\mathbb R^2\to\mathbb R^2\) satisfies \(T\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}2\\0\end{bmatrix}\) and \(T\begin{bmatrix}1\\-1\end{bmatrix}=\begin{bmatrix}0\\4\end{bmatrix}\). Find \(T\begin{bmatrix}3\\1\end{bmatrix}\).
Solution. Method 3. Write \(\begin{bmatrix}3\\1\end{bmatrix}=a\begin{bmatrix}1\\1\end{bmatrix}+b\begin{bmatrix}1\\-1\end{bmatrix}\): \(a+b=3\) and \(a-b=1\), so \(a=2\), \(b=1\). Then
\[T\begin{bmatrix}3\\1\end{bmatrix}=2\,T\begin{bmatrix}1\\1\end{bmatrix}+1\cdot T\begin{bmatrix}1\\-1\end{bmatrix}=2\begin{bmatrix}2\\0\end{bmatrix}+\begin{bmatrix}0\\4\end{bmatrix}=\begin{bmatrix}4\\4\end{bmatrix}.\]Bonus: linear maps and images
A digital image is a grid of pixels. A \(2\times2\) matrix \(A\) can act on the position \(\begin{bmatrix}x_1\\x_2\end{bmatrix}\) of each pixel: the pixel at \(\mathbf x\) is moved to \(A\mathbf x\). Below, the origin is at the center of the picture. Try the preset matrices, or enter your own and apply it.