- #1
mmont012
- 39
- 0
I am taking a linear algebra class, and it has a required lab associated with it. Here is the following problem that I must solve using Matlab
1. Homework Statement
Write a function using row reduction to find the inverse for any given 2x2 matrix. Name your function your initial + inv(M), the output will be the inverse matrix. Test your function with the matrices in problem 1 and check the results by multiplying the inverse to the matrix for the linear system:
x1-2x2=3
2x1+4x2=-5
Solve it by using the inverse matrix you find and then use M/B. Compare the results.
Note: You can't use rref or use inv(M) in your function, you can only use row reduction)
Here are the matrices from problem 1:
M1: [2,3;4,5]
M2: [1,-2,0;4,-7,1;0,3,5]
I'm new to Matlab and I don't know what the teacher is asking. If someone could clarify the instructions that would be very helpful.
As a side note, I typed everything word for word from the handout.
_________________________________________________________________________
EDIT:
I figured it out.
% Let A= Matrix, Let IM= Identity matrix
x=A/IM
Ugh... so simple... I wish that I didn't waste so much time on this problem.
Thank you for looking.
1. Homework Statement
Write a function using row reduction to find the inverse for any given 2x2 matrix. Name your function your initial + inv(M), the output will be the inverse matrix. Test your function with the matrices in problem 1 and check the results by multiplying the inverse to the matrix for the linear system:
x1-2x2=3
2x1+4x2=-5
Solve it by using the inverse matrix you find and then use M/B. Compare the results.
Note: You can't use rref or use inv(M) in your function, you can only use row reduction)
Homework Equations
Here are the matrices from problem 1:
M1: [2,3;4,5]
M2: [1,-2,0;4,-7,1;0,3,5]
The Attempt at a Solution
I'm new to Matlab and I don't know what the teacher is asking. If someone could clarify the instructions that would be very helpful.
As a side note, I typed everything word for word from the handout.
_________________________________________________________________________
EDIT:
I figured it out.
% Let A= Matrix, Let IM= Identity matrix
x=A/IM
Ugh... so simple... I wish that I didn't waste so much time on this problem.
Thank you for looking.
Last edited: