Math 4133 - Linear Algebra
Exam 1 - 2016.02.17
Solutions
(remember Alt+7 gives a text bracket)

1. Consider the following system of equations:

({{{, ({{β x+5y-7z, = 1}, {-2x+4y+z, =2}, {3x+α y-2z, =4}})}})

(a) Solve this system of equations for {x,y,z} in terms of the parameters α and β.
(b) Convert the system to the form AX = B.
(c) Compute the determinant of A.
(d) For what value of β does this system of equations ALWAYS have a solution, independent of α?
(e) Assuming β is not the value found in part (b), express α as a function, f(β), for those values for which the det(A) = 0.
(f) Plot the function α = f(β) found in part (e).
(g) Let α = 2, and β be the value from part (d).  Plot all three planes together on the same graph.
(h) Set β to any value not found in part (d), and α = f(β).  Plot these three planes together on the same graph.
(i) Explain both graphs.

(a) Solve this system of equations for {x,y,z} in terms of the parameters α and β.

Solve[{β x+5y-7z == 1, -2x+4y+z == 2, 3x+α y-2z==4},{x,y,z}]

(b) Convert the system to the form AX = B.

A = {{β, 5, -7},{-2, 4, 1},{3, α, -2}};
X = {{x},{y},{z}};
B = {{1},{2},{4}};

A.X==B

(c) Compute the determinant of A.

Det[A]

(d) For what value of β does this system of equations ALWAYS have a solution, independent of α?

Collect[Det[A], α]

Det[A]/.{β-> 14}

So the value β = 14 is the value which manages to “cancel” out any appearance of α in the determinant, thus there will always be a solution regardless of the value of α.

(e) Assuming β is not the value found in part (b), express α as a function of f(β) for those values for which the det(A) = 0.

Solve[Det[A]==0,α]

So here we have that f(β) = ((79-8 β)/(-14+β))

(f) Plot the function α = f(β) found in part e.

Plot[((79-8 β)/(-14+β)), {β,-50,50},PlotRange->{{-50,50},{-50,50}}]

(g) Let α = 2, and β be the value from part (d).  Plot all three planes together on the same graph.

Plane1 = β x+5y-7z == 1;
Plane2 =  -2x+4y+z == -2;
Plane3 =  3x+α y-2z==4;

N[Solve[{Plane1, Plane2, Plane3}/.{β->14, α-> 2},{x,y,z}]]

ContourPlot3D[Evaluate[{Plane1, Plane2, Plane3}/.{β->14, α-> 2}],{x,-5,-3},{y,-1,1},{z,-9,-7}, ContourStyle->{Red, Blue, Yellow}, Mesh->None, AspectRatio->1]

(h) Set β to any value not found in part (d), and α = f(β).  Plot these three planes together on the same graph.

Plane1 = β x+5y-7z == 1;
Plane2 =  -2x+4y+z == -2;
Plane3 =  3x+α y-2z==4;

ContourPlot3D[Evaluate[{Plane1, Plane2, Plane3}/.{α -> ((79-8 β)/(-14+β))}/.{β->5}],{x,-5,5},{y,-5,5},{z,-5,5}, ContourStyle->{Red, Blue, Yellow}, Mesh->None, AspectRatio->1]

(i) Explain both graphs.

For the first graph, we have selected the value of β for which no value of α makes Det[A] =0, thus we know that there will be an intersection of all three planes, this happens when  {{x->-3.93939,y->-0.393939,z->-8.30303}}.

For the second graph, β is not equal to 14, so setting α = f(β) gives Det[A] = 0.  Thus there will be no solution to all three lines intersection. It is pretty clear from the graph above that these three have no simultaneous solution.

2. Consider the following system of equations AX=B:

(({{5, 6, -5, 3, 4, 2}, {4, -1, -2, 0, 3, 2}, {7, -9, 3, -2, -1, 1}, {2, -3, 5, 1, 1, 0}, {0, 2, 0, 5, 3, -2}, {-1, -2, -1, 2, 3, 4}}))(({{(Subscript[x, 1])}, {(Subscript[x, 2])}, {(Subscript[x, 3])}, {(Subscript[x, 4])}, {(Subscript[x, 5])}, {(Subscript[x, 6])}})) = (({{1}, {0}, {-1}, {0}, {1}, {0}}))

(a) Compute det(A).
(b) Row reduce (A|(Subscript[I, 6])) to compute (A^(-1)).
(c) Use Cramer’s Rule solve for the variable (Subscript[x, 4]).

A = (({{5, 6, -5, 3, 4, 2}, {4, -1, -2, 0, 3, 2}, {7, -9, 3, -2, -1, 1}, {2, -3, 5, 1, 1, 0}, {0, 2, 0, 5, 3, -2}, {-1, -2, -1, 2, 3, 4}}));

(a) Compute det(A).

Det[A]

(b) Row reduce (A|(Subscript[I, 6])) to compute (A^(-1)).

Id6 = IdentityMatrix[6];

(AId6 = Join[A, Id6,2])//MatrixForm

RowReduce[AId6]//MatrixForm

(c) Use Cramer’s Rule solve for the variable (Subscript[x, 4]).

AB4 = (({{5, 6, -5, 1, 4, 2}, {4, -1, -2, 0, 3, 2}, {7, -9, 3, -1, -1, 1}, {2, -3, 5, 0, 1, 0}, {0, 2, 0, 1, 3, -2}, {-1, -2, -1, 0, 3, 4}}));

Det[AB4]/Det[A]

3. Convert the following matrix to upper triangular form using only left multiplication by elementary matrices of type III.  Also, store the corresponding values from the type III matrices correctly into a lower triangular matrix L so that A=LU.  Verify your results.

A = (({{1, -3, 2}, {2, 4, 0}, {-2, 3, 3}}))

A = {{1,-3,2},{2,4,0},{-2,3,3}};

E1 = {{1,0,0},{-2,1,0},{0,0,1}};

E1.A//MatrixForm

E2 = {{1,0,0},{0,1,0},{2,0,1}};

E2.E1.A//MatrixForm

E3 = {{1,0,0},{0,1,0},{0,3/10,1}};

(U = E3.E2.E1.A)//MatrixForm

Lm = {{1,0,0},{2,1,0},{-2,-3/10,1}};

Lm//MatrixForm

Lm.U//MatrixForm

So we have decomposed A into A=LU.  The