Linear Algebra: Matlab Question

Click For Summary
SUMMARY

The discussion centers on solving a linear algebra problem using Matlab, specifically finding the inverse of a 2x2 matrix through row reduction without using built-in functions like rref or inv(M). The user initially struggles with the assignment but later discovers that the solution involves dividing the matrix A by the identity matrix IM. The matrices provided for testing include M1: [2,3;4,5] and M2: [1,-2,0;4,-7,1;0,3,5]. The user expresses relief upon finding a solution but acknowledges the initial confusion.

PREREQUISITES
  • Understanding of linear algebra concepts, specifically matrix inversion
  • Familiarity with Matlab programming and syntax
  • Knowledge of row reduction techniques for solving linear systems
  • Basic understanding of identity matrices and their role in matrix operations
NEXT STEPS
  • Learn how to implement row reduction algorithms in Matlab
  • Explore Matlab functions for matrix manipulation and their limitations
  • Study the properties of 2x2 matrices and their inverses
  • Investigate alternative methods for solving linear systems in Matlab
USEFUL FOR

Students in linear algebra courses, Matlab users seeking to enhance their programming skills, and anyone interested in matrix operations and their applications in solving linear systems.

mmont012
Messages
39
Reaction score
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)

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:
Physics news on Phys.org
mmont012 said:
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.
I don't see how this solves the problem you are asked.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 48 ·
2
Replies
48
Views
5K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 17 ·
Replies
17
Views
9K
  • · Replies 25 ·
Replies
25
Views
4K