Question: Write a function luDecomposition that takes an n x n square matrix A as an input argument and performs Gaussian elimination. The output arguments should

Write a function luDecomposition that takes an nxn square matrix A as an input argument
and performs Gaussian elimination. The output arguments should be, in this order, a lower
triangular matrix L, an upper triangular matrix U, and a permutation matrix P such that PA=LU.
If the matrix A is not square, the function should return a value of [] for each return argument.
Note that "[]" is an empty array. You can create an empty array as follows: myVariable =
[] ; (You can of course use any variable name you would like.) Test your function by running
the test stub called test_luDecomposition.
 Write a function luDecomposition that takes an nxn square matrix A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!