Question:
The given system of equations is
x1 + 2x3 + x4 = 5
x2 + x3 - 3x4 = 3
2x2 + 2x3 + 2x4 = 4
2x1 + 9x4= -2
Answer:
A. The system is consistent because the augmented matrix of the system can be reduced to triangular form.
Step-by-step explanation:
The system of equations can be solved in Matlab
The given 4x4 matrix is
A = [1 0 2 1; 0 1 1 -3; 0 -2 2 2; 2 0 0 9]
The given 4x1 matrix is
B = [5; 3; 4; -2]
We can check if the system can be reduced to lower and upper triangular form by using lu() function
[L,U] = lu(A)
Output:
L =
0.5000 0 1.0000 1.0000
0 -0.5000 1.0000 0
0 1.0000 0 0
1.0000 0 0 0
U =
2.0000 0 0 9.0000
0 -2.0000 2.0000 2.0000
0 0 2.0000 -2.0000
0 0 0 -1.5000
Therefore, the system is consistent because the given matrix of the system can be reduced to lower and upper triangular form.
We can find the corresponding solution of the system using lower and upper triangular matrices obtained in the previous step
x = U\(L\B)
Output:
x =
2.0000
-0.8333
1.8333
-0.6667
Alternatively:
The system can also be solved using linsolve() function
X = linsolve(A,B)
Output:
X =
2.0000
-0.8333
1.8333
-0.6667
As you can notice we got the same results as before.