Homework 5

1. (Although this question is just copying definitions, this is important to understand the whole concepts and I expect students should remember these definitions)
Write down the definition of the following:

(a) WW is a subspace of a vector space VV

WW is a subspace if:

(b) span{v1,....,vn}\operatorname{span}\set{\mathbf{v}_1, ...., \mathbf{v}_n}.

The set of all linear combinations c1v1++cnvnc_1\mathbf{v}_1 + \cdots + c_n\mathbf{v}_n of the vectors v1,,vn\mathbf{v}_1, \ldots, \mathbf{v}_n is called their span.

span{v1,,vn}={c1v1++cnvn:c1,,cnR}\operatorname{span}\set{\mathbf{v}_1, \ldots, \mathbf{v}_n} = \set{c_1\mathbf{v}_1 + \cdots + c_n\mathbf{v}_n : c_1,\ldots,c_n\in \R}

(c) v1,....,vn\mathbf{v}_1, ...., \mathbf{v}_n are linearly independent.

…if and only if

{x1v1++xnvn:xiR}\set{x_1\mathbf{v}_1 + \cdots + x_n\mathbf{v}_n : x_i\in\R}

are distinct vectors.

(d) v1,....,vn\mathbf{v}_1, ...., \mathbf{v}_n are linearly dependent.

…if and only if

vjspan{vi:ij}\exists\mathbf{v}_j \in \operatorname{span}\set{\mathbf{v}_i: i\neq j}

(e) v1,....,vn\mathbf{v}_1, ...., \mathbf{v}_n forms a basis of VV.

…if:

This means that every vector in VV is a unique linear combination of {v1,,vn}\set{\mathbf{v}_1, \ldots, \mathbf{v}_n}.

(f) The dimension of a vector space VV.

…is the number of vectors that make up a basis of VV.

2. Determine if the following sets are subspaces of R3\R^3. Justify your answer.

(i) W1={(x,y,z):x=z+2}W_1 = \set{(x, y, z) : x = z + 2}

Checking 0W1\mathbf{0}\in W_1

Clearly, (0,0,0)W1(0,0,0)\notin W_1. Therefore W1W_1 is not a subspace of R3\R^3.

(x,y,z)=(0,0,0)    00+20W1(x,y,z) = (0,0,0) \implies 0 \neq 0 + 2 \\ \therefore \mathbf{0}\notin W_1

(ii) W2={(x,y,z):x=3y and z=y}W_2 = \set{(x, y, z) : x = 3y \text{ and } z = -y}

Checking if W2W_2 is closed under addition

Consider two vectors (x1y1z1),(x2y2z2)W2\begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix}, \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} \in W_2.

Then,
(x1y1z1)    {x1=3y1z1=y1,(x2y2z2)    {x2=3y2z2=y2\begin{array}{c} \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} \iff \begin{cases} x_1 = 3y_1 \\ z_1 = -y_1 \end{cases}, &\begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} \iff \begin{cases} x_2 = 3y_2 \\ z_2 = -y_2 \end{cases} \end{array}

And so, for (x1y1z1)+(x2y2z2)=(x1+x2y1+y2z1+z2)\begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} + \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \\ z_1 + z_2 \end{pmatrix}, notice that:
{x1+x2=3y1+3y2=3(y1+y2)z1+z2=y1y2=(y1+y2)    (x1+x2y1+y2z1+z2)W2\begin{cases} x_1 + x_2 = 3y_1 + 3y_2 = 3(y_1 + y_2) \\ z_1 + z_2 = -y_1 - y_2 = -(y_1 + y_2) \end{cases} \implies \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \\ z_1 + z_2 \end{pmatrix} \in W_2

As such, W2W_2 is closed under addition.

Checking if W2W_2 is closed under scalar multiplication

Consider αR\alpha\in\R and u=(x1y1z1)W2\mathbf{u}=\begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix}\in W_2. Then, for αu=(αx1αy1αz1)\alpha\mathbf{u} = \begin{pmatrix} \alpha x_1 \\ \alpha y_1 \\ \alpha z_1 \end{pmatrix}, notice that:

{αx1=α(3y1)=3(αy1)αz1=α(y1)=(αy1)    (αx1αy1αz1)W2\begin{cases} \alpha x_1 = \alpha(3y_1) = 3(\alpha y_1) \\ \alpha z_1 = \alpha(-y_1) = -(\alpha y_1) \end{cases} \implies \begin{pmatrix} \alpha x_1 \\ \alpha y_1 \\ \alpha z_1 \end{pmatrix} \in W_2

As such, W2W_2 is closed under scalar multiplication.

Therefore, we can conclude that W2W_2 is a subspace of R3\R^3.

(iii) W3={(x,y,z):z=x2+y2}W_3 = \set{(x, y, z) : z = x^2 + y^2}

Checking if W3W_3 is closed under addition

Consider two vectors u,vW3\mathbf{u},\mathbf{v}\in W_3 where: u=(1,1,2)\mathbf{u} = (1,1,2) and v=(2,2,8)\mathbf{v} = (2, 2, 8).

u=(1,1,2)    2=12+12v=(2,2,8)    8=22+22\mathbf{u} = (1,1,2) \implies 2 = 1^2 + 1^2 \\ \mathbf{v} = (2, 2, 8) \implies 8 = 2^2 + 2^2

Then, u+v=(3,3,10)\mathbf{u}+\mathbf{v} = (3, 3, 10). But clearly, u+vW2\mathbf{u}+\mathbf{v}\notin W_2:

u+v=(3,3,10)    1032+32\mathbf{u}+\mathbf{v} = (3, 3, 10) \implies 10 \neq 3^2 + 3^2

W3W_3 is not closed under addition, therefore it is not a subspace of R3\R^3.

3. For the following sets of vectors

(i) v1=(0,1,1)\mathbf{v}_1 = (0, 1, 1), v2=(1,1,0)\mathbf{v}_2 = (1, -1, 0) and v3=(3,1,2)\mathbf{v}_3 = (3, -1, 2).
(ii) v1=(2,1,3)\mathbf{v}_1 = (2, 1, 3), v2=(1,2,1)\mathbf{v}_2 = (1, -2, 1), v3=(2,3,0)\mathbf{v}_3 = (2, -3, 0) and v4=(0,1,4)\mathbf{v}_4 = (0, -1, 4).
(iii) v1=(1,0,2,1)\mathbf{v}_1 = (1, 0, 2, 1), v2=(2,3,1,1)\mathbf{v}_2 = (-2, 3, -1, 1) and v3=(2,2,1,1)\mathbf{v}_3 = (2, -2, 1, -1).

(a) Determine if the above set of vectors linearly dependent or linearly independent.

(i) v1=(0,1,1)\mathbf{v}_1 = (0, 1, 1), v2=(1,1,0)\mathbf{v}_2 = (1, -1, 0) and v3=(3,1,2)\mathbf{v}_3 = (3, -1, 2).

[013111102]R2+R1[013102102]R3R2[013102000]R1R2[102013000]\begin{array}{c} \begin{bmatrix} 0 & 1 & 3 \\ 1 & -1 & -1 \\ 1 & 0 & 2 \end{bmatrix} &\xrightarrow{R_2 + R_1} &\begin{bmatrix} 0 & 1 & 3 \\ 1 & 0 & 2 \\ 1 & 0 & 2 \end{bmatrix} &\xrightarrow{R_3 - R_2} &\begin{bmatrix} 0 & 1 & 3 \\ 1 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix} &\xrightarrow{R_1 \leftrightarrow R_2} &\begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{bmatrix} \end{array}

The linear combination of the vectors has free variables. As such, they are linearly dependent.

(ii) v1=(2,1,3)\mathbf{v}_1 = (2, 1, 3), v2=(1,2,1)\mathbf{v}_2 = (1, -2, 1), v3=(2,3,0)\mathbf{v}_3 = (2, -3, 0) and v4=(0,1,4)\mathbf{v}_4 = (0, -1, 4).

The number of vectors (4) is greater than their dimensions (3). As such, they are linearly dependent.

(iii) v1=(1,0,2,1)\mathbf{v}_1 = (1, 0, 2, 1), v2=(2,3,1,1)\mathbf{v}_2 = (-2, 3, -1, 1) and v3=(2,2,1,1)\mathbf{v}_3 = (2, -2, 1, -1).

rref[v1v2v3]=rref[122032211111]=[100010001000]\operatorname{rref} \left[ \begin{array}{ccc} | & | & | \\ \mathbf{v}_1 & \mathbf{v}_2 & \mathbf{v}_3 \\ | & | & | \end{array} \right] = \operatorname{rref} \begin{bmatrix} 1 & -2 & 2 \\ 0 & 3 & -2 \\ 2 & -1 & 1 \\ 1 & 1 & -1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}

The linear combination of the vectors do not have free variables. As such, they are linearly independent.

(b) For (i), determine if w=(1,1,1)\mathbf{w} = (1, 1, 1) lies in the span.

Where v1=(0,1,1)\mathbf{v}_1 = (0, 1, 1), v2=(1,1,0)\mathbf{v}_2 = (1, -1, 0), and v3=(3,1,2)\mathbf{v}_3 = (3, -1, 2).

rref[v1v2v3w]=rref[013111111021]=[102001300001]\operatorname{rref} \left[ \begin{array}{ccc|c} | & | & | & | \\ \mathbf{v}_1 & \mathbf{v}_2 & \mathbf{v}_3 & \mathbf{w} \\ | & | & | & | \end{array} \right] = \operatorname{rref} \left[ \begin{array}{ccc|c} 0 & 1 & 3 & 1 \\ 1 & -1 & -1 & 1 \\ 1 & 0 & 2 & 1 \end{array} \right] = \left[ \begin{array}{ccc|c} 1 & 0 & 2 & 0 \\ 0 & 1 & 3 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right]

The system has no solution. Therefore, w=(1,1,1)\mathbf{w} = (1, 1, 1) is not in the span.

(c) For (ii), express v4\mathbf{v}_4 as a linear combination of v1\mathbf{v}_1, v2\mathbf{v}_2 and v3\mathbf{v}_3.

Where v1=(2,1,3)\mathbf{v}_1 = (2, 1, 3), v2=(1,2,1)\mathbf{v}_2 = (1, -2, 1), v3=(2,3,0)\mathbf{v}_3 = (2, -3, 0), and v4=(0,1,4)\mathbf{v}_4 = (0, -1, 4).

rref[v1v2v3v4]=rref[212012313104]=[10021101038110012111]v4=211v1+3811v22111v3\operatorname{rref} \left[ \begin{array}{ccc|c} | & | & | & | \\ \mathbf{v}_1 & \mathbf{v}_2 & \mathbf{v}_3 & \mathbf{v}_4 \\ | & | & | & | \end{array} \right] = \operatorname{rref} \left[ \begin{array}{ccc|c} 2 & 1 & 2 & 0 \\ 1 & -2 & -3 & -1 \\ 3 & 1 & 0 & 4 \end{array} \right] = \left[ \begin{array}{ccc|c} 1 & 0 & 0 & \frac{2}{11} \\[.4em] 0 & 1 & 0 & \frac{38}{11}\\[.4em] 0 & 0 & 1 & -\frac{21}{11} \end{array} \right] \\[1em] \therefore \mathbf{v}_4 = \frac{2}{11}\mathbf{v}_1 + \frac{38}{11}\mathbf{v}_2 -\frac{21}{11}\mathbf{v}_3

4. Expand the kernel of the following matrices as span of vectors and then compute the dimension.

Assuming the question is asking for the dimension of the kernel i.e., the nullity.

(a) [111213]\begin{bmatrix} 1 & 1 \\ 1 & 2 \\ 1 & 3\end{bmatrix}

rref[110120130]=[100010000]ker[111213]={(00)}=span{(00)}\operatorname{rref} \left[ \begin{array}{cc|c} 1 & 1 & 0 \\ 1 & 2 & 0 \\ 1 & 3 & 0 \end{array} \right] = \left[ \begin{array}{cc|c} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{array} \right] \\[1.2em] \therefore\ker\begin{bmatrix} 1 & 1 \\ 1 & 2 \\ 1 & 3 \end{bmatrix} = \Set{\begin{pmatrix} 0 \\ 0 \end{pmatrix}} = \operatorname{span}\Set{ \begin{pmatrix} 0 \\ 0 \end{pmatrix} }

The nullity is zero.

(b) [111111111]\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1\end{bmatrix}


 rref[111011101110]=[111000000000]x1=x2x3x2,x3Rker[111111111]={(x2x3x2x3):x2,x3R}={x2(110)+x3(101):x2,x3R}=span{(110),(101)}\ \operatorname{rref} \left[ \begin{array}{ccc|c} 1 & 1 & 1 & 0 \\ 1 & 1 & 1 & 0 \\ 1 & 1 & 1 & 0 \end{array} \right] = \left[ \begin{array}{ccc|c} 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right] \\ \therefore x_1 = -x_2 - x_3 \\ x_2, x_3 \in\R \\[1.2em] \begin{align*} \therefore\ker\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} &= \Set{ \begin{pmatrix} -x_2 - x_3 \\ x_2 \\ x_3 \end{pmatrix} : x_2, x_3 \in \R } \\ &= \Set{ x_2 \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix} + x_3 \begin{pmatrix} -1 \\ 0 \\ 1 \end{pmatrix} : x_2, x_3 \in \R } \\ &= \operatorname{span}\Set{ \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 1 \end{pmatrix} } \end{align*}

The nullity is two.

(c) [11111110221120322134]\begin{bmatrix} 1 & -1 & -1 & 1 & 1 \\ -1 & 1 & 0 & -2 & 2 \\ 1 & -1 & -2 & 0 & 3 \\ 2 & -2 & -1 & 3 & 4\end{bmatrix}

rref[111110110220112030221340]=[110200001100000010000000]x5=0x3=x4x1=x22x4x2,x4Rker[11111110221120322134]={(x22x4x2x4x40):x2,x4R}={x2(11000)+x4(20110):x2,x4R}=span{(11000),(20110)}\operatorname{rref} \left[ \begin{array}{ccccc|c} 1 & -1 & -1 & 1 & 1 & 0 \\ -1 & 1 & 0 & -2 & 2 & 0 \\ 1 & -1 & -2 & 0 & 3 & 0 \\ 2 & -2 & -1 & 3 & 4 & 0 \end{array} \right] = \left[ \begin{array}{ccccc|c} 1 & -1 & 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right] \\ \therefore x_5 = 0 \\ x_3 = -x_4 \\ x_1 = x_2 - 2x_4 \\ x_2, x_4 \in \R \\[1.2em] \begin{align*} \therefore\ker\begin{bmatrix} 1 & -1 & -1 & 1 & 1 \\ -1 & 1 & 0 & -2 & 2 \\ 1 & -1 & -2 & 0 & 3 \\ 2 & -2 & -1 & 3 & 4 \end{bmatrix} &= \Set{ \begin{pmatrix} x_2 - 2x_4 \\ x_2 \\ -x_4 \\ x_4 \\ 0 \end{pmatrix} : x_2, x_4 \in\R } \\ &= \Set{ x_2 \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} + x_4 \begin{pmatrix} -2 \\ 0 \\ -1 \\ 1 \\ 0 \end{pmatrix} : x_2, x_4 \in\R } \\ &= \operatorname{span}\Set{ \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} -2 \\ 0 \\ -1 \\ 1 \\ 0 \end{pmatrix} } \end{align*}

The nullity is two.

5. Let W={(x1,x2,x3,x4):x1x2+2x3x4=0}W = \set{(x_1, x_2, x_3, x_4) : x_1 - x_2 + 2x_3 - x_4 = 0}. Find a basis for the subspace WW.

x1x2+2x3x4=0    x1=x22x3+x4W={(x22x3+x4x2x3x4):x2,x3,x4R}={x2(1100)+x3(2010)+x4(1001):x2,x3,x4R}basis(W)={(1100),(2010),(1001)}x_1 - x_2 + 2x_3 - x_4 = 0 \implies x_1 = x_2 - 2x_3 + x_4 \\ \begin{align*} W &= \Set{ \begin{pmatrix} x_2 - 2x_3 + x_4 \\ x_2 \\ x_3 \\ x_4 \end{pmatrix} : x_2, x_3, x_4 \in \R } \\ &= \Set{ x_2 \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \end{pmatrix} + x_3 \begin{pmatrix} -2 \\0 \\ 1 \\ 0 \end{pmatrix} + x_4 \begin{pmatrix} 1 \\ 0 \\ 0 \\ 1 \end{pmatrix} : x_2, x_3, x_4 \in \R } \end{align*} \\[2em] \therefore \operatorname{basis}(W) = \Set{ \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \end{pmatrix} , \begin{pmatrix} -2 \\0 \\ 1 \\ 0 \end{pmatrix} , \begin{pmatrix} 1 \\ 0 \\ 0 \\ 1 \end{pmatrix} }

6. Let W={(x1,x2,x3,x4):{x1+x2x3+x4=0,2x1+2x22x3+x4=0,}W = \Set{(x_1, x_2, x_3, x_4) :\begin{cases}x_1 + x_2 - x_3 + x_4 = 0, \\2x_1 + 2x_2 - 2x_3 + x_4 = 0,\end{cases}}. Find a basis for the subspace WW and what is its dimension?

{x1+x2x3+x4=02x1+2x22x3+x4=0    [1111022210][1111022210]R22R1[1111000010]R2R1+R2[1110000010]x4=0x1=x2+x3x2,x3RW={(x2+x3x2x30):x2,x3R}={x2(1100)+x3(1010):x2,x3R}basis(W)={(1100),(1010)}\begin{array}{c} \begin{cases} x_1 + x_2 - x_3 + x_4 = 0 \\ 2x_1 + 2x_2 - 2x_3 + x_4 = 0 \end{cases} &\iff& \left[ \begin{array}{cccc|c} 1 & 1 & -1 & 1 & 0 \\ 2 & 2 & -2 & 1 & 0 \end{array} \right] \end{array} \\[2em] \begin{array}{c} \left[ \begin{array}{cccc|c} 1 & 1 & -1 & 1 & 0 \\ 2 & 2 & -2 & 1 & 0 \end{array} \right] &\xrightarrow{R_2 - 2R_1} &\left[ \begin{array}{cccc|c} 1 & 1 & -1 & 1 & 0 \\ 0 & 0 & 0 & -1 & 0 \end{array} \right] &\xrightarrow[-R_2]{R_1 + R_2} &\left[ \begin{array}{cccc|c} 1 & 1 & -1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \end{array} \right] \end{array} \\ \therefore x_4 = 0 \\ x_1 = -x_2 + x_3 \\ x_2, x_3 \in \R \\ \begin{align*} W &= \Set{ \begin{pmatrix} -x_2 + x_3 \\ x_2 \\ x_3 \\ 0 \end{pmatrix} : x_2, x_3 \in \R } \\ &= \Set{ x_2 \begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \end{pmatrix} + x_3 \begin{pmatrix} 1 \\ 0 \\ 1 \\ 0 \end{pmatrix}: x_2, x_3 \in \R } \end{align*} \\[2em] \therefore\operatorname{basis}(W) = \Set{ \begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ 1 \\ 0 \end{pmatrix} }

The nullity is two.

Homework 5

  1. (Although this question is just copying definitions, this is important to understand the whole concepts and I expect students should remember these definitions)
    Write down the definition of the following:
  1. Determine if the following sets are subspaces of R3\R^3. Justify your answer.
  1. For the following sets of vectors

(a) Determine if the above set of vectors linearly dependent or linearly independent.

  1. Expand the kernel of the following matrices as span of vectors and then compute the dimension.