Skip to main content

Tutorial 6

Tutorial 6: Matrix Algebra for Non-Homogeneous Linear Algebraic System

Tutorial QuestionTutorial Solution
  1. Solve the unknown F\boldsymbol{F} for the following equation:

    14[220trace(C)AT.BC]=13EF20determinant(D)D where A=[102313],B=[468257],C=[10113102725702927]D=[120130004],E=[221122212]\begin{aligned} & \frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^{\boldsymbol{T}} . \mathbf{B}-\mathbf{C}\right]=\frac{1}{3} \boldsymbol{E} \boldsymbol{F}-\frac{20}{\operatorname{determinant}(\mathbf{D})} \mathbf{D} \\ & \text { where } \mathbf{A}=\left[\begin{array}{ccc}1 & 0 & 2 \\3 & -1 & -3\end{array}\right], \mathbf{B}=\left[\begin{array}{ccc}4 & 6 & 8 \\-2 & 5 & 7\end{array}\right], \mathbf{C}=\left[\begin{array}{ccc}10 & 11 & 3 \\-10 & -27 & -25 \\70 & -29 & -27\end{array}\right] \\ & \mathbf{D}=\left[\begin{array}{ccc}1 & 2 & 0 \\-1 & 3 & 0 \\0 & 0 & 4\end{array}\right], \mathbf{E}=\left[\begin{array}{ccc}2 & -2 & 1 \\1 & 2 & 2 \\2 & 1 & -2\end{array}\right] \end{aligned}

    13E=\frac{1}{3} \boldsymbol{E}= orthogonal matrix if (13E)1=(13E)T\left(\frac{1}{3} \boldsymbol{E}\right)^{-1}=\left(\frac{1}{3} \boldsymbol{E}\right)^{T}, verify if 13E\frac{1}{3} \boldsymbol{E} is an orthogonal matrix or not, hence use it for the calculation.

    Solution
    F=(13E)1(14[220trace(C)AT.BC]+20determinant(D)D)F=(13E)T(14[220trace(C)AT. B C]+20determinant(D)D)\begin{aligned} \boldsymbol{F}&=\left(\frac{1}{3} \boldsymbol{E}\right)^{-1}\left(\frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^T . \mathbf{B}-\mathbf{C}\right]+\frac{20}{\operatorname{determinant}(\mathbf{D})} \mathbf{D}\right)\\ \boldsymbol{F}&=\left(\frac{1}{3} \boldsymbol{E}\right)^T\left(\frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^T \text {. B }-\mathbf{C}\right]+\frac{20}{\operatorname{determinant}(\mathbf{D})} \mathbf{D}\right) \end{aligned}

    trace(C)=102727=44\operatorname{trace}(\boldsymbol{C})=10-27-27=-44

    AT=[130123]ATB=[130123][468257]=[221292571435]\begin{aligned} \mathbf{A}^{\boldsymbol{T}}&=\left[\begin{array}{cc} 1 & 3 \\ 0 & -1 \\ 2 & -3 \end{array}\right]\\ \mathbf{A}^{\boldsymbol{T}} \cdot \mathbf{B}&=\left[\begin{array}{cc} 1 & 3 \\ 0 & -1 \\ 2 & -3 \end{array}\right]\left[\begin{array}{ccc} 4 & 6 & 8 \\ -2 & 5 & 7 \end{array}\right]=\left[\begin{array}{ccc} -2 & 21 & 29 \\ 2 & -5 & -7 \\ 14 & -3 & -5 \end{array}\right] \end{aligned}
    14[220trace(C)ATBC]=14[22044[221292571435][10113102725702927]]=14[[10105145102535701525][10113102725702927]=14[[0116148052601404452]]=[0293701315351113]\begin{aligned} \frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^T \cdot \mathbf{B}-\mathbf{C}\right]&=\frac{1}{4}\left[\frac{220}{-44}\left[\begin{array}{ccc} -2 & 21 & 29 \\ 2 & -5 & -7 \\ 14 & -3 & -5 \end{array}\right]-\left[\begin{array}{ccc} 10 & 11 & 3 \\ -10 & -27 & -25 \\ 70 & -29 & -27 \end{array}\right]\right]\\ &\begin{aligned} &=\frac{1}{4}\left[\left[\begin{array}{ccc} 10 & -105 & -145 \\ -10 & 25 & 35 \\ -70 & 15 & 25 \end{array}\right]-\left[\begin{array}{ccc} 10 & 11 & 3 \\ -10 & -27 & -25 \\ 70 & -29 & -27 \end{array}\right]\right. \\ &=\frac{1}{4}\left[\left[\begin{array}{ccc} 0 & -116 & -148 \\ 0 & 52 & 60 \\ -140 & 44 & 52 \end{array}\right]\right]=\left[\begin{array}{ccc} 0 & -29 & -37 \\ 0 & 13 & 15 \\ -35 & 11 & 13 \end{array}\right] \end{aligned} \end{aligned}
    determinant(D)=120130004=1(12)2(4)=2020 determinant (D)D=2020[120130004]=[120130004]\begin{aligned} \operatorname{determinant}(\mathbf{D})&=\left|\begin{array}{ccc} 1 & 2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 4 \end{array}\right|=1(12)-2(-4)=20\\ \frac{20}{\text { determinant }(\mathbf{D})} \mathbf{D}&=\frac{20}{20}\left[\begin{array}{ccc} 1 & 2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 4 \end{array}\right]=\left[\begin{array}{ccc} 1 & 2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 4 \end{array}\right]\\ \end{aligned}
    (14[220trace(C)ATBC]+20determinant(D)D)=[0293701315351113]+[120130004]=[1273711615351117]\begin{aligned} \left(\frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^{\boldsymbol{T}} \cdot \mathbf{B}-\mathbf{C}\right]+\frac{20}{\operatorname{determinant}(\mathbf{D})} \mathbf{D}\right) &=\left[\begin{array}{ccc} 0 & -29 & -37 \\ 0 & 13 & 15 \\ -35 & 11 & 13 \end{array}\right]+\left[\begin{array}{ccc} 1 & 2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 4 \end{array}\right]\\ &=\left[\begin{array}{ccc} 1 & -27 & -37 \\ -1 & 16 & 15 \\ -35 & 11 & 17 \end{array}\right] \end{aligned}
    (13E)1=[2/32/31/31/32/32/32/31/32/3]1=1det(13E)adjoint(13E)\left(\frac{1}{3} \boldsymbol{E}\right)^{-1}=\left[\begin{array}{ccc} 2 / 3 & -2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & 2 / 3 \\ 2 / 3 & 1 / 3 & -2 / 3 \end{array}\right]^{-1}=\frac{1}{\operatorname{det}\left(\frac{1}{3} \boldsymbol{E}\right)} \operatorname{adjoint}\left(\frac{1}{3} \boldsymbol{E}\right)
    cofactor(13E)=[2/32/31/32/31/32/32/32/31/32/32/31/32/31/31/32/3]2/31/32/32/32/32/32/31/32/31/32/32/32/31/31/32/32/32/31/32/3=[2/32/31/31/32/32/32/31/32/3]\begin{aligned} \operatorname{cofactor}\left(\frac{1}{3}\boldsymbol{E}\right)=& \left[ \begin{array}{ccc} \left| \begin{array}{cc} 2/3 & 2/3 \\ 1/3 & -2/3 \end{array} \right| & -\left| \begin{array}{cc} 1/3 & 2/3 \\ 2/3 & -2/3 \end{array} \right| & \left| \begin{array}{cc} 1/3 & 2/3 \\ 2/3 & 1/3 \end{array} \right| \\ -2/3 & 1/3 & 1/3 \\ & & -2/3 \end{array} \right] \left| \begin{array}{cc} 2/3 & 1/3 \\ 2/3 & -2/3 \end{array} \right| \\ &- \left|\begin{array}{cc} 2 / 3 & -2 / 3 \\ 2 / 3 & 1 / 3 \end{array}\right|\left|\begin{array}{cc} -2 / 3 & 1 / 3 \\ 2 / 3 & 2 / 3 \end{array}\right|-\left|\begin{array}{cc} 2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 \end{array}\right|\left|\begin{array}{cc} 2 / 3 & -2 / 3 \\ 1 / 3 & 2 / 3 \end{array}\right| \\ &=\left[\begin{array}{ccc} -2 / 3 & 2 / 3 & -1 / 3 \\ -1 / 3 & -2 / 3 & -2 / 3 \\ -2 / 3 & -1 / 3 & 2 / 3 \end{array}\right] \end{aligned}
     adjoint (13E)=[ cofactor (13E)]T=[2/31/32/32/32/31/31/32/32/3]\text { adjoint }\left(\frac{1}{3} \boldsymbol{E}\right)=\left[\text { cofactor }\left(\frac{1}{3} \boldsymbol{E}\right)\right]^T=\left[\begin{array}{ccc} -2 / 3 & -1 / 3 & -2 / 3 \\ 2 / 3 & -2 / 3 & -1 / 3 \\ -1 / 3 & -2 / 3 & 2 / 3 \end{array}\right]
    det(13E)=2/32/31/31/32/32/32/31/32/3=1\operatorname{det}\left(\frac{1}{3} \boldsymbol{E}\right)=\left|\begin{array}{ccc} 2 / 3 & -2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & 2 / 3 \\ 2 / 3 & 1 / 3 & -2 / 3 \end{array}\right|=-1
    (13E)1=11[2/31/32/32/32/31/31/32/32/3]=[2/31/32/32/32/31/31/32/32/3]\left(\frac{1}{3} \boldsymbol{E}\right)^{-1}=\frac{1}{-1}\left[\begin{array}{ccc} -2 / 3 & -1 / 3 & -2 / 3 \\ 2 / 3 & -2 / 3 & -1 / 3 \\ -1 / 3 & -2 / 3 & 2 / 3 \end{array}\right]=\left[\begin{array}{ccc} 2 / 3 & 1 / 3 & 2 / 3 \\ -2 / 3 & 2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & -2 / 3 \end{array}\right]
    (13E)T=[2/32/31/31/32/32/32/31/32/3]T=[2/31/32/32/32/31/31/32/32/3]\left(\frac{1}{3} \boldsymbol{E}\right)^T=\left[\begin{array}{ccc} 2 / 3 & -2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & 2 / 3 \\ 2 / 3 & 1 / 3 & -2 / 3 \end{array}\right]^T=\left[\begin{array}{ccc} 2 / 3 & 1 / 3 & 2 / 3 \\ -2 / 3 & 2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & -2 / 3 \end{array}\right]

    \therefore It is verified that 13E\frac{1}{3} \boldsymbol{E} is an orthogonal matrix, where (13E)1=(13E)T\left(\frac{1}{3} \boldsymbol{E}\right)^{-1}=\left(\frac{1}{3} \boldsymbol{E}\right)^T

    F=(13E)T(14[220trace(C)ATBC]+20determinant(D)D)=[2/31/32/32/32/31/31/32/32/3][1273711615351117]=[2316/325/31397/3121/32317/341/3]\begin{aligned} \boldsymbol{F} &=\left(\frac{1}{3} \boldsymbol{E}\right)^T\left(\frac{1}{4}\left[\frac{220}{\operatorname{trace}(\boldsymbol{C})} \mathbf{A}^T \cdot \mathbf{B}-\mathbf{C}\right]+\frac{20}{\operatorname{determinant}(\mathbf{D})} \mathbf{D}\right) \\ &=\left[\begin{array}{ccc} 2 / 3 & 1 / 3 & 2 / 3 \\ -2 / 3 & 2 / 3 & 1 / 3 \\ 1 / 3 & 2 / 3 & -2 / 3 \end{array}\right]\left[\begin{array}{ccc} 1 & -27 & -37 \\ -1 & 16 & 15 \\ -35 & 11 & 17 \end{array}\right] \\ &=\left[\begin{array}{ccc} -23 & -16 / 3 & -25 / 3 \\ -13 & 97 / 3 & 121 / 3 \\ 23 & -17 / 3 & -41 / 3 \end{array}\right] \end{aligned}
  2. Choose the correct graph for each case, then comment on the condition of the coefficient matrix in terms of its determinant and the characteristic of the solution without solving it.

    Case 1Case 2Case 3
    3x2+7x1=5x22x1=12\begin{aligned} 3x_2+7x_1&=-5\\x_2-2x_1&=\frac{1}{2}\end{aligned}x2+2x1=42x2+3.999x1=7.999\begin{aligned} x_2+2x_1&=4\\2x_2+3.999x_1&=7.999\end{aligned}5x2+20x1=1x2+4x1=2\begin{aligned} 5x_2+20x_1&=-1\\x_2+4x_1&=2\end{aligned}

    Image for Question 2

    Solution

    Case 1

    3x2+7x1=5x22x1=12\begin{aligned} 3 x_2+7 x_1&=-5 \\ x_2-2 x_1&=\frac{1}{2} \\ \end{aligned}
    x2=(73)x1+(53)x2=2x1+(0.5)\begin{aligned} x_2&=-\left(\frac{7}{3}\right) x_1+\left(\frac{-5}{3}\right) \\ x_2&=2 x_1+(0.5) \end{aligned}

    Graph (c).

    There is one interception point. The coefficient matrix is well-conditioned where the determinant \neq 0 (i.e. Huge slope difference).

    There is unique solution for a well-conditioned system.


    Case 2

    x2+2x1=42x2+3.999x1=7.999\begin{aligned} x_2+2 x_1&=4 \\ 2 x_2+3.999 x_1&=7.999 \end{aligned}
    x2=2x1+(4)x2=(3.9992)x1+(7.9992)\begin{aligned} x_2&=-2 x_1+(4) \\ x_2&=-\left(\frac{3.999}{2}\right) x_1+\left(\frac{7.999}{2}\right) \end{aligned}

    Graph (a).

    There are many interception points. The coefficient matrix is ill-conditioned where the determinant \approx 0 (i.e. Close slope).

    There are many solutions for an ill-conditioned system and the solutions are sensitive to the noise.


    Case 3

    5x2+20x1=1x2+4x1=2\begin{aligned} 5 x_2+20 x_1&=-1\\ x_2+4 x_1&=2 \end{aligned}
    x2=4x1+(15)x2=4x1+2\begin{aligned} x_2&=-4 x_1+\left(\frac{-1}{5}\right)\\ x_2&=-4 x_1+2 \end{aligned}

    Graph (b).

    There is no interception points. The coefficient matrix is singular where the determinant = 0 (i.e. Exact same slope).

    There is no solutions for the singular system which has no interception points.

  3. Continue to solve Q2 by using Cramer's rule. Hence, verify the solution.

Solution

Case 1

3x2+7x1=5x22x1=12\begin{aligned} 3 x_2+7 x_1&=-5\\ x_2-2 x_1&=\frac{1}{2} \end{aligned}
x1=571223712=6.513=0.5x2=351123712=6.513=0.5\begin{aligned} x_1&=\frac{\left|\begin{array}{cc} -5 & 7 \\ \frac{1}{2} & -2 \end{array}\right|}{\left|\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right|} \\ &=\frac{6.5}{-13}=-0.5\\ x_2&=\frac{\left|\begin{array}{cc} 3 & -5 \\ 1 & \frac{1}{2} \end{array}\right|}{\left|\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right|}\\ &=\frac{6.5}{-13}=-0.5\\ \end{aligned}
[3712]{0.50.5}={50.5}\left[\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right]\left\{\begin{array}{c} -0.5 \\ -0.5 \end{array}\right\}\\ =\left\{\begin{array}{c} -5 \\ 0.5 \end{array}\right\}

(verified)


Case 2

x2+2x1=42x2+3.999x1=7.999\begin{aligned} x_2+2 x_1&=4\\ 2 x_2+3.999 x_1&=7.999\\ \end{aligned}
x1=427.9993.9991223.999=0.0020.001=2x2=1427.9991223.999=0.0010.001=1\begin{aligned} x_1 &=\frac{\left|\begin{array}{cc} 4 & 2 \\ 7.999 & 3.999 \end{array}\right|}{\left|\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right|} \\ &=\frac{-0.002}{-0.001}=2\\ x_2&=\frac{\left|\begin{array}{cc} 1 & 4 \\ 2 & 7.999 \end{array}\right|}{\left|\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right|}\\ &=\frac{-0.001}{-0.001}=1\\ \end{aligned}
[1223.999]{21}={47.99}\left[\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right] \left\{\begin{array}{l} 2 \\ 1 \end{array}\right\}\\ =\left\{\begin{array}{c} 4 \\ 7.99 \end{array} \right\}

(verified)


Case 3

5x2+20x1=1x2+4x1=2\begin{aligned} 5 x_2+20 x_1&=-1 \\ x_2+4 x_1&=2 \end{aligned}
x1=1202452014=440=x2=511252014=110=\begin{aligned} x_1 &=\frac{\left|\begin{array}{cc} -1 & 20 \\ 2 & 4 \end{array}\right|}{\left|\begin{array}{cc} 5 & 20 \\ 1 & 4 \end{array}\right|} \\ &=\frac{-44}{0}=\infty \\ x_2 &=\frac{\left|\begin{array}{cc} 5 & -1 \\ 1 & 2 \end{array}\right|}{\left|\begin{array}{cc} 5 & 20 \\ 1 & 4 \end{array}\right|} \\ &=\frac{11}{0}=\infty \\ \end{aligned}
[308338]{}{12}{\left[\begin{array}{ll} 30 & 8 \\ 33 & 8 \end{array}\right]\left\{\begin{array}{l} \infty \\ \infty \end{array}\right\} \neq\left\{\begin{array}{c} -1 \\ 2 \end{array}\right\} }

({}\left\{\begin{array}{l}\infty \\\infty\end{array}\right\} is not the solution)

No solution because 52014=0\left|\begin{array}{cc}5&20\\1&4\end{array}\right|=0, singular system

  1. [A]{x}={b}[A]\{x\}=\{b\} where [A]=[A]= coefficient matrix that represents the physical system, while {x}\{x\} and {b}\{b\} are the unknown and known parameters respectively. Compute the solution with the parameters measured with noise using Cramer's rule. Comment on the solution if it is accurately computed \& discuss why.

    CaseActual parameters with no noiseMeasured parameters with noise
    1[3712]{x}={50.5},{x}={0.50.5}\left[\begin{array}{cc}3 & 7 \\1 & -2\end{array}\right]\{x\}=\left\{\begin{array}{c}-5 \\0.5\end{array}\right\},\{x\}=\left\{\begin{array}{c}-0.5 \\-0.5\end{array}\right\}[3712]{x}={5.0010.4999}\left[\begin{array}{cc}3 & 7 \\1 & -2\end{array}\right]\{x\}=\left\{\begin{array}{c}-5.001 \\0.4999\end{array}\right\}
    2[1223.999]{x}={47.999},{x}={21}\left[\begin{array}{cc}1 & 2 \\2 & 3.999\end{array}\right]\{x\}=\left\{\begin{array}{c}4 \\7.999\end{array}\right\},\{x\}=\left\{\begin{array}{l}2 \\1\end{array}\right\}[3712]{x}={4.0017.998}\left[\begin{array}{cc}3 & 7 \\1 & -2\end{array}\right]\{x\}=\left\{\begin{array}{c}4.001 \\7.998\end{array}\right\}
Solution

Case 1

[3712]{x}={5.0010.4999}{\left[\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right]\{x\}=\left\{\begin{array}{c} -5.001 \\ 0.4999 \end{array}\right\}}
x1=5.00170.499923712=6.502713=0.5002x2=35.00110.49993712=6.500713=0.5001\begin{aligned} x_1&=\frac{\left|\begin{array}{cc} -5.001 & 7 \\ 0.4999 & -2 \end{array}\right|}{\left|\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right|} \\ &=\frac{6.5027}{-13}=-0.5002 \\ x_2&=\frac{\left|\begin{array}{cc} 3 & -5.001 \\ 1 & 0.4999 \end{array}\right|}{\left|\begin{array}{cc} 3 & 7 \\ 1 & -2 \end{array}\right|} \\ &=\frac{6.5007}{-13}=-0.5001 \end{aligned}

Solution for noise case is approximate to no noise case

{x}noise ={0.50020.5001}{x}true ={0.50.5}\{x\}_{\text {noise }}=\left\{\begin{array}{l} -0.5002 \\ -0.5001 \end{array}\right\} \approx \{x\}_{\text {true }}=\left\{\begin{array}{l} -0.5 \\ -0.5 \end{array}\right\}

Since Case 1 is well-conditioned system, the noise is not amplified during the calculation and the solution is robust to noise. Hence it is close to the actual solution.


Case 2

[1223.999]{x}={4.0017.998}{\left[\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right]\{x\} } =\left\{\begin{array}{cc} 4.001 \\ 7.998 \end{array}\right\}
x1=4.00127.9983.9991223.999=0.0039990.001=3.999x2=14.00127.9981223.999=0.0040.001=4.000\begin{aligned} x_1 &=\frac{\left|\begin{array}{cc} 4.001 & 2 \\ 7.998 & 3.999 \end{array}\right|}{\left|\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right|} \\ &=\frac{0.003999}{-0.001}=-3.999 \\ x_2&=\frac{\left|\begin{array}{cc} 1 & 4.001 \\ 2 & 7.998 \end{array}\right|}{\left|\begin{array}{cc} 1 & 2 \\ 2 & 3.999 \end{array}\right|}\\ &=\frac{-0.004}{-0.001}=4.000 \end{aligned}

Solution for noise case is far away from the no noise case

{x}noise ={3.9994.000}{x}true ={21}\{x\}_{\text {noise }}=\left\{\begin{array}{c} -3.999 \\ 4.000 \end{array}\right\} \neq \{x\}_{\text {true }}=\left\{\begin{array}{l} 2 \\ 1 \end{array}\right\}

Since Case 2 is ill-conditioned system, the noise is amplified during the calculation and the solution is sensitive to noise. Hence, the solution deviates from the actual solution.

  1. Perform GEwPP to solve the following linear algebraic equations. The calculation must involves the scaling, partial pivoting, forward elimination and the backward substitution procedures.

    y+z+2t=0x+2y+3z+t=5x+2y+z=42x+y+z+t=3\begin{gathered} y+z+2 t=0 \\ x+2 y+3 z+t=5 \\ x+2 y+z=4 \\ 2 x+y+z+t=3 \end{gathered}
Solution
[0112123112102111]{xyzt}={0543}\left[\begin{array}{llll} 0 & 1 & 1 & 2 \\ 1 & 2 & 3 & 1 \\ 1 & 2 & 1 & 0 \\ 2 & 1 & 1 & 1 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{l} 0 \\ 5 \\ 4 \\ 3 \end{array}\right\}

After scaling,

[01212113231131211201121212]{xyzt}={053232}\left[\begin{array}{cccc} 0 & \frac{1}{2} & \frac{1}{2} & 1 \\ \frac{1}{3} & \frac{2}{3} & 1 & \frac{1}{3} \\ \frac{1}{2} & 1 & \frac{1}{2} & 0 \\ 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{l} 0 \\ \frac{5}{3} \\ 2 \\ \frac{3}{2} \end{array}\right\}

Partial pivoting step - switch the row so that the pivot element is the largest

[11212121323113121120012121]{xyzt}={325320}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ \frac{1}{3} & \frac{2}{3} & 1 & \frac{1}{3} \\ \frac{1}{2} & 1 & \frac{1}{2} & 0 \\ 0 & \frac{1}{2} & \frac{1}{2} & 1 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{5}{3} \\ 2 \\ 0 \end{array}\right\}

Forward elimination: R2R2R1×(1/3);R3R3R1×(1/2)\mathrm{R} 2 \rightarrow \mathrm{R} 2-\mathrm{R} 1\times(1 / 3) ; \mathrm{R} 3 \rightarrow \mathrm{R} 3-\mathrm{R} 1\times(1 / 2)

[112121201256160341414012121]{xyzt}={3276540}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & \frac{1}{2} & \frac{5}{6} & \frac{1}{6} \\ 0 & \frac{3}{4} & \frac{1}{4} & -\frac{1}{4} \\ 0 & \frac{1}{2} & \frac{1}{2} & 1 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{7}{6} \\ \frac{5}{4} \\ 0 \end{array}\right\}

The pivot element is now 12\frac{1}{2}, no scaling is needed as the max element is 1 in the coefficient matrix. Perform Partial pivoting step.

[112121203414140125616012121]{xyzt}={3254760}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & \frac{3}{4} & \frac{1}{4} & -\frac{1}{4} \\ 0 & \frac{1}{2} & \frac{5}{6} & \frac{1}{6} \\ 0 & \frac{1}{2} & \frac{1}{2} & 1 \end{array}\right]\left\{\begin{array}{c} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{5}{4} \\ \frac{7}{6} \\ 0 \end{array}\right\}

Forward elimination: R3R3R2(1/23/4);R4R4R2(1/23/4)\mathrm{R} 3 \rightarrow \mathrm{R} 3-\mathrm{R} 2 *\left(\frac{1 / 2}{3 / 4}\right) ; \mathrm{R} 4 \rightarrow \mathrm{R} 4-\mathrm{R} 2 *\left(\frac{1 / 2}{3 / 4}\right)

[11212120341414002313001376]{xyzt}={32541356}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & \frac{3}{4} & \frac{1}{4} & -\frac{1}{4} \\ 0 & 0 & \frac{2}{3} & \frac{1}{3} \\ 0 & 0 & \frac{1}{3} & \frac{7}{6} \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{5}{4} \\ \frac{1}{3} \\ -\frac{5}{6} \end{array}\right\}

The pivot element is now 23\frac{2}{3}. Perform scaling shows that no partial pivoting is needed as the pivot element is the largest.

[1121212034141400231300271]{xyzt}={32541357}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & \frac{3}{4} & \frac{1}{4} & -\frac{1}{4} \\ 0 & 0 & \frac{2}{3} & \frac{1}{3} \\ 0 & 0 & \frac{2}{7} & 1 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{5}{4} \\ \frac{1}{3} \\ -\frac{5}{7} \end{array}\right\}

Forward elimination: R4R4R3(2/72/3)R 4 \rightarrow R 4-R 3^*\left(\frac{2 / 7}{2 / 3}\right)

[1121212034141400231300067]{xyzt}={32541367}\left[\begin{array}{cccc} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & \frac{3}{4} & \frac{1}{4} & -\frac{1}{4} \\ 0 & 0 & \frac{2}{3} & \frac{1}{3} \\ 0 & 0 & 0 & \frac{6}{7} \end{array}\right]\left\{\begin{array}{c} x \\ y \\ z \\ t \end{array}\right\}=\left\{\begin{array}{c} \frac{3}{2} \\ \frac{5}{4} \\ \frac{1}{3} \\ -\frac{6}{7} \end{array}\right\}

Backward substitution,

t=6767=1z=1313t(23)=1y=54+14t14z(34)=1x=3212t12z12y(1)=1{xyzt}={1111}\begin{aligned} t&=\frac{-\frac{6}{7}}{\frac{6}{7}}=-1\\ z&=\frac{\frac{1}{3}-\frac{1}{3} t}{\left(\frac{2}{3}\right)}=1 \\ y&=\frac{\frac{5}{4}+\frac{1}{4} t-\frac{1}{4} z}{\left(\frac{3}{4}\right)}=1 \\ x&=\frac{\frac{3}{2}-\frac{1}{2} t-\frac{1}{2} z-\frac{1}{2} y}{(1)}=1 \\ \left\{\begin{array}{l} x \\ y \\ z \\ t \end{array}\right\}&=\left\{\begin{array}{c} 1 \\ 1 \\ 1 \\ -1 \end{array}\right\} \end{aligned}
  1. Obtain the following information for the following matrices.

    i. Row echelon form (REF).

    Solution
    [1343912269]R3R3R1(2)R2R2R1(3)[134000001]R2R3 [134001000]\left[\begin{array}{cccc} 1 & 3 & 4\\ 3 & 9 & 12\\ 2 & 6 & 9 \end{array}\right] \xrightarrow[R3\rightarrow R3-R1(2)]{R2\rightarrow R2-R1(3)} \left[\begin{array}{cccc} 1 & 3 & 4\\ 0 & 0 & 0\\ 0 & 0 & 1 \end{array}\right] \xrightarrow[R2 \leftrightarrow R3]{~} \left[\begin{array}{cccc} 1 & 3 & 4\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{array}\right]

    ii. Reduced row echelon form (RREF).

    Solution

    [134001000]\left[\begin{array}{cccc}1 & 3 & 4\\0 & 0 & 1\\0 & 0 & 0\end{array}\right] is the RREF

    iii. Number of linear independent vector.

    Solution

    2 linear independent vector

    iv. Rank & check if it is full rank or rank deficient matrix.

    Matrix AMatrix B
    [1121212034141400231300067]\begin{bmatrix} 1 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\[5pt] 0 & \frac{3}{4} & \frac{1}{4} & - \frac{1}{4} \\[5pt] 0 & 0 & \frac{2}{3} & \frac{1}{3} \\[5pt] 0 & 0 & 0 & \frac{6}{7}\end{bmatrix}[1343912269]\begin{bmatrix}1&3&4\\3&9&12\\2&6&9\end{bmatrix}
    Solution

    Rank = 2. It is rank deficient matrix

  2. An electronics company produces transistors, resistors and computer chips. Each transistors requires 4 units of copper, 1 unit of zinc, and 2 units of glass. Each resistor requires 3,3 , and 1 unit(s) of the three materials, respectively. Each computer chip requires 2,1 , and 3 unit(s) of the three materials, respectively. The amounts of materials available are 960 units of copper, 510 units of zinc, and 610 units of glass in week 1. The amounts of materials available are 960 units of copper, 510 units of zinc, and 610 units of glass in a week. By using GEwPP, calculate the number of transistors, resistors and computer chips produced per day in average by considering 5 working days per week.

Solution
ComponentsCopperZincGlass
Transistors, TT412
Resistors, RR331
Computer Chips, CC213
4T+3R+2C=960T+3R+C=5102T+R+3C=610[432131213]{TRC}={960510610}\begin{aligned} 4 T+3 R+2 C&=960 \\ T+3 R+C&=510 \\ 2 T+R+3 C&=610 \\ \left[\begin{array}{lll} 4 & 3 & 2 \\ 1 & 3 & 1 \\ 2 & 1 & 3 \end{array}\right]\left\{\begin{array}{l} T \\ R \\ C \end{array}\right\} &= \left\{\begin{array}{l} 960 \\ 510 \\ 610 \end{array}\right\} \end{aligned}

Scaling

[13/41/21/311/32/31/31]{TRC}={240170610/3}\left[\begin{array}{ccc} 1 & 3 / 4 & 1 / 2 \\ 1 / 3 & 1 & 1 / 3 \\ 2 / 3 & 1 / 3 & 1 \end{array}\right]\left\{\begin{array}{l} T \\ R \\ C \end{array}\right\}=\left\{\begin{array}{c} 240 \\ 170 \\ 610 / 3 \end{array}\right\}

No pivoting is needed.

R3R2R1(2/3)R2R2R1(1/3)[13/41/203/41/601/62/3]{TRC}={24090130/3}\xrightarrow[R3\rightarrow R2-R1(2/3)]{R2\rightarrow R2-R1(1/3)} \left[\begin{array}{ccc} 1 & 3 / 4 & 1 / 2 \\ 0 & 3 / 4 & 1 / 6 \\ 0 & -1/6 & 2 / 3 \end{array}\right]\left\{\begin{array}{l} T \\ R \\ C \end{array}\right\}=\left\{\begin{array}{c} 240 \\ 90 \\ 130 / 3 \end{array}\right\}

No scaling \& pivoting is needed.

R3R3R21/63/4 [13/41/203/41/60019/27]{TRC}={24090190/3}\xrightarrow[R 3 \rightarrow R 3-R 2 * \frac{-1 / 6}{3 / 4}]{~}\left[\begin{array}{ccc} 1 & 3 / 4 & 1 / 2 \\ 0 & 3 / 4 & 1 / 6 \\ 0 & 0 & 19 / 27 \end{array}\right]\left\{\begin{array}{l} T \\ R \\ C \end{array}\right\}=\left\{\begin{array}{c} 240 \\ 90 \\ 190 / 3 \end{array}\right\}

Backward substitution

C=19031927=90R=90(16)C3/4=100T=240(12)C(34)R1=120{TRC}per week ={10090};{TR} per day ={120/5100/5}={242018}\begin{gathered} C=\frac{\frac{190}{3}}{\frac{19}{27}}=90 \\ R=\frac{90-\left(\frac{1}{6}\right) C}{3 / 4}=100 \\ T=\frac{240-\left(\frac{1}{2}\right) C-\left(\frac{3}{4}\right) R}{1}=120 \\ \left\{\begin{array}{l} T \\ R \\ C \end{array}\right\}_{\text {per week }}=\left\{\begin{array}{c} 100 \\ 90 \end{array}\right\} ;\left\{\begin{array}{l} T \\ R \end{array}\right\} \text { per day }=\left\{\begin{array}{c} 120 / 5 \\ 100 / 5 \end{array}\right\}=\left\{\begin{array}{l} 24 \\ 20 \\ 18 \end{array}\right\} \end{gathered}
  1. A civil engineer involved in construction requires 4800,5800 , and 5700 m35700 \mathrm{~m}^{3} of sand, fine gravel and coarse gravel, respectively, for a building project. There are three pits from which these materials can be obtained. The composition of these pits is given below. How much cubic meters must be hauled from each pit in order to meet the engineer's needs? Use Cramer's Rule to solve it.

    Sand %Fine Gravel %Coarse Gravel %
    Pit 1523018
    Pit 2205030
    Pit 3252055
Solution
0.52P1+0.2P2+0.25P3=48000.30P1+0.50P2+0.20P3=58000.18P1+0.30P2+0.55P3=5700\begin{aligned} 0.52 P_1+0.2 P_2+0.25 P_3&=4800\\ 0.30 P_1+0.50 P_2+0.20 P_3&=5800\\ 0.18 P_1+0.30 P_2+0.55 P_3&=5700\\ \end{aligned}
[0.520.20.250.300.500.200.180.300.55]{P1P2P3}={480058005700}\left[\begin{array}{ccc} 0.52 & 0.2 & 0.25 \\ 0.30 & 0.50 & 0.20 \\ 0.18 & 0.30 & 0.55 \end{array}\right]\left\{\begin{array}{l} P_1 \\ P_2 \\ P_3 \end{array}\right\}=\left\{\begin{array}{l} 4800 \\ 5800 \\ 5700 \end{array}\right\}
P1=48000.20.2558000.50.2570030550.520.20.250.300.500.200.180.300.55=(344.5)0.086=4005.8 m3P2=0.5248000.250.358000.20.1857000.550.520.20.250.300.500.200.180.300.55=(613.3)0.086=7131.4 m3P3=0.520.248000.30.558000.180.3057000.520.20.250.300.500.200.180.300.55=4440.086=5162.8 m3{P1P2P3}={4005.87131.45162.8}\begin{aligned} P_1&=\frac{\left|\begin{array}{ccc} 4800 & 0.2 & 0.25 \\ 5800 & 0.5 & 0.2 \\ 5700 & 30 & 55 \end{array}\right|}{\left|\begin{array}{ccc} 0.52 & 0.2 & 0.25 \\ 0.30 & 0.50 & 0.20 \\ 0.18 & 0.30 & 0.55 \end{array}\right|}=\frac{(344.5)}{0.086}=4005.8 \mathrm{~m}^3\\ P_2&=\frac{\left|\begin{array}{ccc} 0.52 & 4800 & 0.25 \\ 0.3 & 5800 & 0.2 \\ 0.18 & 5700 & 0.55 \end{array}\right|}{\left|\begin{array}{ccc} 0.52 & 0.2 & 0.25 \\ 0.30 & 0.50 & 0.20 \\ 0.18 & 0.30 & 0.55 \end{array}\right|}=\frac{(613.3)}{0.086}=7131.4 \mathrm{~m}^3\\ P_3&=\frac{\left|\begin{array}{ccc} 0.52 & 0.2 & 4800 \\ 0.3 & 0.5 & 5800 \\ 0.18 & 0.30 & 5700 \end{array}\right|}{\left|\begin{array}{ccc} 0.52 & 0.2 & 0.25 \\ 0.30 & 0.50 & 0.20 \\ 0.18 & 0.30 & 0.55 \end{array}\right|}=\frac{444}{0.086}=5162.8 \mathrm{~m}^3\\ \left\{\begin{array}{l} P_1 \\ P_2 \\ P_3 \end{array}\right\}&=\left\{\begin{array}{l} 4005.8 \\ 7131.4 \\ 5162.8 \end{array}\right\} \end{aligned}
  1. Figure below shows three reactors linked by pipes. The mass balance equations for the reactors are shown below:

    For steady state flow: Mass flow rate input == Mass flow rate output

    For example, 400mg/s+Q21c2=Q13c1+Q12c1400 \mathrm{mg} / \mathrm{s}+Q_{21} c_{2}=Q_{13} c_{1}+Q_{12} c_{1} for reactor 1 , where QQ is flow rate in m3/s,c\mathrm{m}^{3} / \mathrm{s}, c is concentration of the reactor mg/m3\mathrm{mg} / \mathrm{m}^{3}

    Figure for Question 9

Continue to develop the linear algebraic equations for the reactors 2 and 3 . Then, solve the concentrations of the reactors by using the Naïve GE.

Solution
400+Q21c2=Q13c1+Q12c1Q12c1=Q21c2+Q23c2Q23c2+Q13c1+200=Q33c3\begin{aligned} 400+Q_{21} c_2&=Q_{13} c_1+Q_{12} c_1 \\ Q_{12} c_1&=Q_{21} c_2+Q_{23} c_2 \\ Q_{23} c_2+Q_{13} c_1+200&=Q_{33} c_3 \end{aligned}

Rearrange:

400=Q13c1+Q12c1Q21c20=Q12c1+Q21c2+Q23c2200=Q13c1Q23c2+Q33c3\begin{aligned} 400&=Q_{13} c_1+Q_{12} c_1-Q_{21} c_2 \\ 0&=-Q_{12} c_1+Q_{21} c_2+Q_{23} c_2 \\ 200&=-Q_{13} c_1-Q_{23} c_2+Q_{33} c_3 \end{aligned}
[Q13+Q12Q210Q12Q21+Q230Q13Q23Q33]{c1c2c3}={4000200}[40+802008020+6004060120]{c1c2c3}={4000200}\begin{aligned} \left[\begin{array}{ccc} Q_{13}+Q_{12} & -Q_{21} & 0 \\ -Q_{12} & Q_{21}+Q_{23} & 0 \\ -Q_{13} & -Q_{23} & Q_{33} \end{array}\right]\left\{\begin{array}{l} c_1 \\ c_2 \\ c_3 \end{array}\right\}&=\left\{\begin{array}{c} 400 \\ 0 \\ 200 \end{array}\right\} \\ \left[\begin{array}{ccc} 40+80 & -20 & 0 \\ -80 & 20+60 & 0 \\ -40 & -60 & 120 \end{array}\right]\left\{\begin{array}{l} c_1 \\ c_2 \\ c_3 \end{array}\right\}&=\left\{\begin{array}{c} 400 \\ 0 \\ 200 \end{array}\right\} \end{aligned}

Naïve GE without scaling and partial pivoting, just directly forward elimination and back substitution.

Forward elimination step:

R3R3R1(40/120)R2R2R1(80/120)[1202000200/300200/3120]{c1c2c3}={400800/31000/3}\xrightarrow[R3\rightarrow R3-R1(-40/120)]{R2\rightarrow R2-R1(-80/120)} \left[\begin{array}{ccc} 120 & -20 & 0 \\ 0 & 200 / 3 & 0 \\ 0 & -200 / 3 & 120 \end{array}\right]\left\{\begin{array}{l} c_1 \\ c_2 \\ c_3 \end{array}\right\}=\left\{\begin{array}{c} 400 \\ 800 / 3 \\ 1000 / 3 \end{array}\right\}
R3R3R2(200/3200/3) [1202000200/3000120]{c1c2c3}={400800/3600}\xrightarrow[R3\rightarrow R3-R2(\frac{-200/3}{200/3})]{~} \left[\begin{array}{ccc} 120 & -20 & 0 \\ 0 & 200 / 3 & 0 \\ 0 & 0 & 120 \end{array}\right]\left\{\begin{array}{l} c_1 \\ c_2 \\ c_3 \end{array}\right\}=\left\{\begin{array}{c} 400 \\ 800 / 3 \\ 600 \end{array}\right\}

Back substitution step:

c3=600120=5c2=800/3200/3=4c1=400(20)c2120=4{c1c2c3}={445}mg/m3\begin{gathered} c_3=\frac{600}{120}=5 \\ c_2=\frac{800 / 3}{200 / 3}=4 \\ c_1=\frac{400-(-20) c_2}{120}=4 \\ \left\{\begin{array}{l} c_1 \\ c_2 \\ c_3 \end{array}\right\}=\left\{\begin{array}{l} 4 \\ 4 \\ 5 \end{array}\right\} m g / m^3 \end{gathered}
  1. Given z=a0+a1x+a2yz=a_{0}+a_{1} x+a_{2} y is a plane equation, where aa is the constant coefficient. 3 planes are given below, please suggest a suitable method based on the determinant analysis and continue to find the intersection point/ line of the planes, if it exists.

    Figure for Question 10

Solution
3x+6y3z=64x2y+6z=23x+2y+z=2\begin{aligned} 3 x+6 y-3 z&=-6 \\ 4 x-2 y+6 z&=2 \\ 3 x+2 y+z&=-2 \end{aligned}
[363426321]{xyz}={622}\left[\begin{array}{ccc} 3 & 6 & -3 \\ 4 & -2 & 6 \\ 3 & 2 & 1 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -6 \\ 2 \\ -2 \end{array}\right\}

Scaling is important to standardize the matrix before determinant analysis especially for the ill-conditioned case. However, since we don't know the case in the first place, it is important to perform scaling before calculate the determinant

[3/613/64/62/6112/31/3]{xyz}={12/62/3}\left[\begin{array}{ccc} 3 / 6 & 1 & -3 / 6 \\ 4 / 6 & -2 / 6 & 1 \\ 1 & 2 / 3 & 1 / 3 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -1 \\ 2 / 6 \\ -2 / 3 \end{array}\right\}

Determinant analysis:

3/613/64/62/6112/31/3=36(21823)1(4181)+(36)(818+26)=0\left|\begin{array}{ccc} 3 / 6 & 1 & -3 / 6 \\ 4 / 6 & -2 / 6 & 1 \\ 1 & 2 / 3 & 1 / 3 \end{array}\right|=\frac{3}{6}\left(\frac{-2}{18}-\frac{2}{3}\right)-1\left(\frac{4}{18}-1\right)+\left(\frac{-3}{6}\right)\left(\frac{8}{18}+\frac{2}{6}\right)=0

Since determinant =0=0, it is singular system where it might have zero solution or infinite solutions.

Matrix inversion method or Cramer's method are not suitable to solve this problem. Thus GEwPP is suggested.

Continue with partial pivoting to reduce the effect of divide by zero issue:

[12/31/34/62/613/613/6]{xyz}={2/32/61}\left[\begin{array}{ccc} 1 & 2 / 3 & 1 / 3 \\ 4 / 6 & -2 / 6 & 1 \\ 3 / 6 & 1 & -3 / 6 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -2 / 3 \\ 2 / 6 \\ -1 \end{array}\right\}

Forward elimination

R3R3R1(3/6)R2R2R1(4/6)[12/31/307/97/902/32/3]{xyz}={2/37/92/3}\xrightarrow[R 3 \rightarrow R 3-R 1 (3 / 6)]{R 2 \rightarrow R 2-R 1 (4 / 6)} \left[\begin{array}{ccc} 1 & 2 / 3 & 1 / 3 \\ 0 & -7 / 9 & 7 / 9 \\ 0 & 2 / 3 & -2 / 3 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -2 / 3 \\ 7 / 9 \\ -2 / 3 \end{array}\right\}

Pivot element at second row has largest magnitude, thus no partial pivoting is needed.

Forward elimination

R3R3R2(2/37/9)[12/31/307/97/9000]{xyz}={2/37/90}\xleftarrow[R 3 \rightarrow R 3-R 2 *\left(\frac{2 / 3}{-7 / 9}\right)]{}\left[\begin{array}{ccc} 1 & 2 / 3 & 1 / 3 \\ 0 & -7 / 9 & 7 / 9 \\ 0 & 0 & 0 \end{array}\right]\left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -2 / 3 \\ 7 / 9 \\ 0 \end{array}\right\}

Backward substitution

0z=00 z=0

ZZ can be any solution, let z=t,tz=t,-\infty \leq t \leq \infty

y=7979z79=1+z=1+tx=2313z23y1=2313t23(1+t)=t{xyz}={t1+tt}\begin{gathered} y=\frac{\frac{7}{9}-\frac{7}{9} z}{-\frac{7}{9}}=-1+z=-1+t \\ x=\frac{-\frac{2}{3}-\frac{1}{3} z-\frac{2}{3} y}{1}=-\frac{2}{3}-\frac{1}{3} t-\frac{2}{3}(-1+t)=-t \\ \left\{\begin{array}{l} x \\ y \\ z \end{array}\right\}=\left\{\begin{array}{c} -t \\ -1+t \\ t \end{array}\right\} \end{gathered}

Based on the result, a 3D3 \mathrm{D} line is intersecting all the planes. It can be plotted by using software.

>> t=-100:0.1:100;
>> x=-t;
>> y=-1+t;
>> z=t;
>> xlabel("x")
>> ylabel("y")
>> zlabel("z")
Figure for Solution 10
Your Help needed

This website has received 3000 view in the first two weeks! However, this project repository did not receive any star! Just simply head over to this website's repository to give it a star! Every tutorial takes me around two hours to compile, proof-read and styling this website! Your simple action would encourage me a lot! Thank you! You could Buy me a coffee too!