Question: ( 2 points ) In a typical first - year linear algebra course, a commonly - taught method for finding the inverse of a square
points In a typical firstyear linear algebra course, a commonlytaught method for finding the inverse of a square matrix
is to put
into reducedrow echelon form RREF If the result is of the form
then
is the inverse of
We will see that this method is rather slow compared to the inv function in MATLAB.
We can show the elapsed time by enclosing our command between tic and toc. For example, A rand; tic; invA; toc; will show the elapsed time for computing the inverse of the random matrix A
In MATLAB, define a
matrix
so that all the diagonal entries are equal to and the remaining entries are all equal to
Write code to obtain the elapsed time for computing invA the elapsed time for computing the RREF of
and the elapsed time for computing an LUdecomposition of
In a comment after the code for this question, report your observations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
