Example 3. Use the improved
Gauss-Jordan elimination subroutine with row interchanges to solve
.
Use the matrix A and vector B in Example 2.
Solution 3.
Perform Gauss-Jordan elimination with row interchanges.
Verify the solution.
We are done.
Aside. We can compare
our answer with the answer obtained by using Mathematica's
built in RowReduce procedure.
This agrees with our answer that was obtained with our subroutine GaussJordan[M,3].
Aside. We can compute the solution X with Mathematica's "LinearSolve" procedure.
(c) John H. Mathews 2004