Homework 1

1. Solve the following systems of linear equations by Gaussian elimination:

(a) {2y8z=8x2y+z=04x+5y+9z=9\left\{ \begin{array}{l} 2y -8z = 8 \\ x -2y + z = 0 \\ -4x + 5y + 9z = -9 \end{array}\right.

{2y8z=8x2y+z=04x+5y+9z=9    [028812104599]R2+R112R1[014410784599]R3+4R2[01441078051923]R1R2[10780144051923]R35R2[107801440013]R2+4R3R1+7R3[10029010160013]x=29,y=16,z=3\begin{array}{ccl} \left\{ \begin{array}{l} 2y -8z = 8 \\ x -2y + z = 0 \\ -4x + 5y + 9z = -9 \end{array} \right. &\iff &\left[ \begin{array}{ccc|c} 0 & 2 & -8 & 8 \\ 1 & -2 & 1 & 0 \\ -4 & 5 & 9 & -9 \end{array} \right] \\ &\xrightarrow[R_2 + R_1]{\frac{1}{2}R_1} &\left[ \begin{array}{ccc|c} 0 & 1 & -4 & 4 \\ 1 & 0 & -7 & 8 \\ -4 & 5 & 9 & -9 \end{array} \right] \\ &\xrightarrow{R_3 + 4R_2} &\left[ \begin{array}{ccc|c} 0 & 1 & -4 & 4 \\ 1 & 0 & -7 & 8 \\ 0 & 5 & -19 & 23 \end{array} \right] \\ &\xrightarrow{R_1 \leftrightarrow R_2} &\left[ \begin{array}{ccc|c} 1 & 0 & -7 & 8 \\ 0 & 1 & -4 & 4 \\ 0 & 5 & -19 & 23 \end{array} \right] \\ &\xrightarrow{R_3 - 5R_2} &\left[ \begin{array}{ccc|c} 1 & 0 & -7 & 8 \\ 0 & 1 & -4 & 4 \\ 0 & 0 & 1 & 3 \end{array} \right] \\ &\xrightarrow[R_2 + 4R_3]{R_1 + 7R_3} &\left[ \begin{array}{ccc|c} 1 & 0 & 0 & 29 \\ 0 & 1 & 0 & 16 \\ 0 & 0 & 1 & 3 \end{array} \right] \end{array} \\[2em] \therefore x = 29, y=16, z=3

(b) {x12x3=1x2x4=23x2+2x3=04x1+7x4=5\left\{ \begin{array}{l} x_1 - 2x_3 = -1 \\ x_2 - x_4 = 2 \\ -3x_2 + 2x_3 = 0 \\ -4x_1 + 7x_4 = -5 \end{array} \right.

{x12x3=1x2x4=23x2+2x3=04x1+7x4=5    [10201010120320040075]R3+3R2R4+4R1[10201010120023600879]R4+4R3[102010101200236000515]15R412R3[102010101200132300013]R2+R3R3+32R4[102010100100103200013]R1+2R3[100040100100103200013]x1=4,x2=1,x3=32,x4=3\begin{array}{ccl} \left\{ \begin{array}{l} x_1 - 2x_3 = -1 \\ x_2 - x_4 = 2 \\ -3x_2 + 2x_3 = 0 \\ -4x_1 + 7x_4 = -5 \end{array} \right. &\iff &\left[ \begin{array}{cccc|c} 1 & 0 & -2 & 0 & -1 \\ 0 & 1 & 0 & -1 & 2 \\ 0 & -3 & 2 & 0 & 0 \\ -4 & 0 & 0 & 7 & -5 \end{array} \right] \\ &\xrightarrow[R_3 + 3R_2]{R_4 + 4R_1} &\left[ \begin{array}{cccc|c} 1 & 0 & -2 & 0 & -1 \\ 0 & 1 & 0 & -1 & 2 \\ 0 & 0 & 2 & -3 & 6 \\ 0 & 0 & -8 & 7 & -9 \end{array} \right] \\ &\xrightarrow{R_4 + 4R_3} &\left[ \begin{array}{cccc|c} 1 & 0 & -2 & 0 & -1 \\ 0 & 1 & 0 & -1 & 2 \\ 0 & 0 & 2 & -3 & 6 \\ 0 & 0 & 0 & -5 & 15 \end{array} \right] \\ &\xrightarrow[-\frac{1}{5}R_4]{\frac{1}{2}R_3} &\left[ \begin{array}{cccc|c} 1 & 0 & -2 & 0 & -1 \\ 0 & 1 & 0 & -1 & 2 \\ 0 & 0 & 1 & -\frac{3}{2} & 3 \\ 0 & 0 & 0 & 1 & -3 \end{array} \right] \\ &\xrightarrow[R_2 + R_3]{R_3 + \frac{3}{2}R_4} &\left[ \begin{array}{cccc|c} 1 & 0 & -2 & 0 & -1 \\ 0 & 1 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & -\frac{3}{2} \\ 0 & 0 & 0 & 1 & -3 \end{array} \right] \\ &\xrightarrow{R_1 + 2R_3} &\left[ \begin{array}{cccc|c} 1 & 0 & 0 & 0 & -4 \\ 0 & 1 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & -\frac{3}{2} \\ 0 & 0 & 0 & 1 & -3 \end{array} \right] \end{array} \\[2em] \therefore x_1 = -4, x_2 = -1, x_3 = -\frac{3}{2}, x_4 = -3

2. The sum of any two of three real numbers are 2424, 2828, 3030. Find these three numbers.

Let x,y,zRx,y,z \in \R. Then:
{x+y=24y+z=28z+x=30    [110240112810130]R1R2R3R1[1014011280116]R3+R2[10140112800234]12R3[10140112800117]R1+R3R2R3[100130101100117]x=13,y=11,z=17\begin{array}{c} \left\{ \begin{array}{l} x+y = 24 \\ y+z = 28 \\ z+x = 30 \end{array} \right. &\iff &\left[ \begin{array}{ccc|c} 1 & 1 & 0 & 24 \\ 0 & 1 & 1 & 28 \\ 1 & 0 & 1 & 30 \end{array} \right] \\ &\xrightarrow[R_1 - R_2]{R_3 - R_1} &\left[ \begin{array}{ccc|c} 1 & 0 & -1 & -4 \\ 0 & 1 & 1 & 28 \\ 0 & -1 & 1 & 6 \end{array} \right] \\ &\xrightarrow{R_3 + R_2} &\left[ \begin{array}{ccc|c} 1 & 0 & -1 & -4 \\ 0 & 1 & 1 & 28 \\ 0 & 0 & 2 & 34 \end{array} \right] \\ &\xrightarrow{\frac{1}{2}R_3} &\left[ \begin{array}{ccc|c} 1 & 0 & -1 & -4 \\ 0 & 1 & 1 & 28 \\ 0 & 0 & 1 & 17 \end{array} \right] \\ &\xrightarrow[R_1 + R_3]{R_2 - R_3} &\left[ \begin{array}{ccc|c} 1 & 0 & 0 & 13 \\ 0 & 1 & 0 & 11 \\ 0 & 0 & 1 & 17 \end{array} \right] \end{array} \\[2em] \therefore x = 13, y = 11, z = 17

As such, the three real numbers are 1313, 1111, and 1717.

3. Find the polynomial of degree 2 f(t)=a+bt+ct2f(t) = a+bt+ct^2 whose graph passes through (1,1)(1, -1), (2,3)(2, 3) and (3,13)(3, 13).

{a+b(1)+c(1)2=1a+b(2)+c(2)2=3a+b(3)+c(3)2=13    {a+b+c=1a+2b+4c=3a+3b+9c=13    [1111124313913]R3R1R2R1[1111013402814]R32R2[111101340026]12R3[111101340013]R23R3R1R3[110401050013]R1R2[100101050013]\begin{array}{c} &\left\{ \begin{array}{ll} a + b(1) + c(1)^2 &= -1 \\ a + b(2) + c(2)^2 &= 3 \\ a + b(3) + c(3)^2 &= 13 \end{array} \right. &\iff &\left\{ \begin{array}{ll} a + b + c &= -1 \\ a + 2b + 4c &= 3 \\ a + 3b + 9c &= 13 \end{array} \right. \\ \iff &\left[ \begin{array}{ccc|c} 1 & 1 & 1 & -1 \\ 1 & 2 & 4 & 3 \\ 1 & 3 & 9 & 13 \end{array} \right] &\xrightarrow[R_3 - R_1]{R_2 - R_1} &\left[ \begin{array}{ccc|c} 1 & 1 & 1 & -1 \\ 0 & 1 & 3 & 4 \\ 0 & 2 & 8 & 14 \end{array} \right] \\ &&\xrightarrow{R_3 - 2R_2} &\left[ \begin{array}{ccc|c} 1 & 1 & 1 & -1 \\ 0 & 1 & 3 & 4 \\ 0 & 0 & 2 & 6 \end{array} \right] \\ &&\xrightarrow{\frac{1}{2}R_3} &\left[ \begin{array}{ccc|c} 1 & 1 & 1 & -1 \\ 0 & 1 & 3 & 4 \\ 0 & 0 & 1 & 3 \end{array} \right] \\ &&\xrightarrow[R_2 - 3R_3]{R_1 - R_3} &\left[ \begin{array}{ccc|c} 1 & 1 & 0 & -4 \\ 0 & 1 & 0 & -5 \\ 0 & 0 & 1 & 3 \end{array} \right] \\ &&\xrightarrow{R_1 - R_2} &\left[ \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -5 \\ 0 & 0 & 1 & 3 \end{array} \right] \end{array}

As such, the function
f(t)=15t+3t2f(t) = 1 -5t + 3t^2

is a polynomial of degree two that passes through the points (1,1)(1, -1), (2,3)(2, 3), and (3,13)(3, 13).

4. Use some online program, write down the echelon form of the following system and solve the system as well. {x2y+3z4w+5v=12x+3y+4z+5w6v=22x2y+3z3w+6v=0x+yzw+3v=23x+4y+5z6w4v=0\left\{\begin{array}{l}x-2y+3z-4w+5v=-1\\2x+3y+4z+5w-6v=2\\2x-2y+3z-3w+6v=0\\x+y-z-w+3v=2\\3x+4y+5z-6w-4v=0\end{array}\right.

 
{x2y+3z4w+5v=12x+3y+4z+5w6v=22x2y+3z3w+6v=0x+yzw+3v=23x+4y+5z6w4v=0    [123451234562223360111132345640]careful calculations[1000017166401000543664001005166400010229664000013383]x=171664,y=543664,z=51664,w=229664,v=3383\begin{array}{rl} \left\{ \begin{array}{l} x-2y+3z-4w+5v=-1\\ 2x+3y+4z+5w-6v=2\\ 2x-2y+3z-3w+6v=0\\ x+y-z-w+3v=2\\ 3x+4y+5z-6w-4v=0 \end{array} \right. \iff &\left[ \begin{array}{ccccc|c} 1 & -2 & 3 & -4 & 5 & -1\\ 2 & 3 & 4 & 5 & -6 & 2\\ 2 & -2 & 3 & -3 & 6 & 0\\ 1 & 1 & -1 & -1 & 3 & 2\\ 3 & 4 & 5 & -6 & -4 & 0 \end{array} \right] \\[3em] \xrightarrow{\text{careful calculations}} &\left[ \begin{array}{ccccc|c} 1 & 0 & 0 & 0 & 0 & \frac{171}{664} \\[.5em] 0 & 1 & 0 & 0 & 0 & \frac{543}{664} \\[.5em] 0 & 0 & 1 & 0 & 0 & -\frac{51}{664} \\[.5em] 0 & 0 & 0 & 1 & 0 & \frac{229}{664} \\[.5em] 0 & 0 & 0 & 0 & 1 & \frac{33}{83} \\[.5em] \end{array} \right] \end{array} \\[2em] \therefore x = \frac{171}{664}, y = \frac{543}{664}, z = -\frac{51}{664}, w = \frac{229}{664}, v = \frac{33}{83}

5. Find the following products. Explain why if it is undefined.

(a) [0132][23]\begin{bmatrix} 0 & 1 \\ 3 & 2\end{bmatrix}\begin{bmatrix} 2 \\ -3\end{bmatrix}

[0132][23]=[0(2)+1(3)3(2)+2(3)]=[30]\begin{bmatrix} 0 & 1 \\ 3 & 2 \end{bmatrix} \begin{bmatrix} 2 \\ -3 \end{bmatrix} = \begin{bmatrix} 0(2) + 1(-3) \\ 3(2) + 2(-3) \end{bmatrix} = \begin{bmatrix} -3 \\ 0 \end{bmatrix}

(b) [123456][78]\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\end{bmatrix}\begin{bmatrix} 7 \\ 8\end{bmatrix}

[123456][78]\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix} \begin{bmatrix} 7 \\ 8 \end{bmatrix} is undefined because the number of columns in the first matrix does not match the number of rows in the second.

(c) [013256][21]\begin{bmatrix} 0 & 1 \\ 3 & 2 \\ 5 & 6\end{bmatrix}\begin{bmatrix} 2 \\ 1\end{bmatrix}

[013256][21]=[0(2)+1(1)3(2)+2(1)5(2)+6(1)]=[1816]\begin{bmatrix} 0 & 1 \\ 3 & 2 \\ 5 & 6 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \end{bmatrix} = \begin{bmatrix} 0(2) + 1(1) \\ 3(2) + 2(1) \\ 5(2) + 6(1) \end{bmatrix} = \begin{bmatrix} 1 \\ 8 \\ 16 \end{bmatrix}

(d) [0134][2114]\begin{bmatrix} 0 & 1 & 3 & 4\end{bmatrix}\begin{bmatrix} 2 \\ 1 \\ -1 \\ 4\end{bmatrix}

[0134][2114]=[0(2)+1(1)+3(1)+4(4)]=[14]\begin{bmatrix} 0 & 1 & 3 & 4 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ -1 \\ 4 \end{bmatrix} = \begin{bmatrix} 0(2) + 1(1) + 3(-1) +4(4) \end{bmatrix} = \begin{bmatrix} 14 \end{bmatrix}

(e) [0134][2114]\begin{bmatrix} 0 \\ 1 \\ 3 \\ 4\end{bmatrix}\begin{bmatrix} 2 \\ 1 \\ -1 \\ 4\end{bmatrix}

[0134][2114]\begin{bmatrix} 0 \\ 1 \\ 3 \\ 4 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ -1 \\ 4 \end{bmatrix} is undefined because the number of columns in the first matrix does not match the number of rows in the second.

6. Express the vector b=[212]\mathbf{b} = \begin{bmatrix}2\\1\\2\end{bmatrix} as a linear combination of v1=[111],v2=[121],v3=[231]\mathbf{v_1} = \begin{bmatrix} 1\\-1\\1 \end{bmatrix}, \mathbf{v_2}=\begin{bmatrix} -1\\2\\1 \end{bmatrix}, \mathbf{v_3}=\begin{bmatrix} 2\\3\\-1 \end{bmatrix}.

[112212311112]R3+R1R2+R1[112201532014]R32R1[112201530230]R32R2[1122015300136]113R3[11220153001613]R25R3[1122010913001613]R1+R2[1023513010913001613]R12R3[1002313010913001613]b=2313v1+913v2+613v3\begin{array}{c} \left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ -1 & 2 & 3 & 1 \\ 1 & 1 & -1 & 2 \end{array} \right] &\xrightarrow[R_3 + R_1]{R_2 + R_1} &\left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ 0 & 1 & 5 & 3 \\ 2 & 0 & 1 & 4 \end{array} \right] \\[2em] &\xrightarrow{R_3 - 2R_1} &\left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ 0 & 1 & 5 & 3 \\ 0 & 2 & -3 & 0 \end{array} \right] \\[2em] &\xrightarrow{R_3 - 2R_2} &\left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ 0 & 1 & 5 & 3 \\ 0 & 0 & -13 & -6 \end{array} \right] \\[2em] &\xrightarrow{-\frac{1}{13}R_3} &\left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ 0 & 1 & 5 & 3 \\ 0 & 0 & 1 & \frac{6}{13} \end{array} \right] \\[2em] &\xrightarrow{R_2 - 5R_3} &\left[ \begin{array}{ccc|c} 1 & -1 & 2 & 2 \\ 0 & 1 & 0 & \frac{9}{13} \\ 0 & 0 & 1 & \frac{6}{13} \end{array} \right] \\[2em] &\xrightarrow{R_1 + R_2} &\left[ \begin{array}{ccc|c} 1 & 0 & 2 & \frac{35}{13} \\ 0 & 1 & 0 & \frac{9}{13} \\ 0 & 0 & 1 & \frac{6}{13} \end{array} \right] \\[2em] &\xrightarrow{R_1 - 2R_3} &\left[ \begin{array}{ccc|c} 1 & 0 & 0 & \frac{23}{13} \\ 0 & 1 & 0 & \frac{9}{13} \\ 0 & 0 & 1 & \frac{6}{13} \end{array} \right] \end{array} \\[2em] \therefore \mathbf{b} = \frac{23}{13}\mathbf{v_1} +\frac{9}{13}\mathbf{v_2} +\frac{6}{13}\mathbf{v_3}

7. Can the vector b=[212]\mathbf{b} = \begin{bmatrix}2\\1\\2\end{bmatrix} be expressed as a linear combination of v1=[123],v2=[456],v3=[789]\mathbf{v_1} = \begin{bmatrix} 1\\2\\3 \end{bmatrix}, \mathbf{v_2}=\begin{bmatrix} 4\\5\\6 \end{bmatrix}, \mathbf{v_3}=\begin{bmatrix} 7\\8\\9 \end{bmatrix}? Explain.

[147225813692]R33R1R22R1[1472036306124]R32R2[147203630002]\begin{array}{c} \left[ \begin{array}{ccc|c} 1 & 4 & 7 & 2 \\ 2 & 5 & 8 & 1 \\ 3 & 6 & 9 & 2\\ \end{array} \right] &\xrightarrow[R_3 - 3R_1]{R_2 - 2R_1} &\left[ \begin{array}{ccc|c} 1 & 4 & 7 & 2 \\ 0 & -3 & -6 & -3 \\ 0 & -6 & -12 & -4\\ \end{array} \right] \\ &\xrightarrow{R_3 - 2R_2} &\left[ \begin{array}{ccc|c} 1 & 4 & 7 & 2 \\ 0 & -3 & -6 & -3 \\ 0 & 0 & 0 & 2\\ \end{array} \right] \end{array}

No. The vector b=[212]\mathbf{b} = \begin{bmatrix}2\\1\\2\end{bmatrix} cannot be expressed as a linear combination of v1=[123],v2=[456],v3=[789]\mathbf{v_1} = \begin{bmatrix} 1\\2\\3 \end{bmatrix}, \mathbf{v_2}=\begin{bmatrix} 4\\5\\6 \end{bmatrix}, \mathbf{v_3}=\begin{bmatrix} 7\\8\\9 \end{bmatrix} because the system does not have a solution.

Homework 1

  1. Solve the following systems of linear equations by Gaussian elimination:
  1. Find the following products. Explain why if it is undefined.