Linear Algebra: Matlab Question

In summary: The instructions clearly state to write a function using row reduction to find the inverse of a 2x2 matrix and test it with given matrices. Please clarify. In summary, the conversation discusses a linear algebra class with a required lab. The problem at hand is to write a function in Matlab using row reduction to find the inverse of a 2x2 matrix. This function must be tested with two given matrices and the results must be compared by multiplying the inverse to the original matrix. The conversation concludes with the individual realizing the solution is to use the matrix divided by the identity matrix.
  • #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)

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
  • #2
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.
 

1. What is Linear Algebra?

Linear algebra is a branch of mathematics that deals with systems of linear equations and their representations in vector spaces. It involves the study of linear transformations, matrices, and determinants.

2. What is Matlab?

Matlab is a high-level programming language and interactive environment used for numerical computation, visualization, and programming. It is commonly used in scientific and engineering applications, including linear algebra calculations.

3. How is Linear Algebra used in Matlab?

Linear Algebra is used in Matlab through its built-in functions and operations for matrix manipulation and solving systems of linear equations. It also has specialized toolboxes for solving specific linear algebra problems, such as eigenvalue and singular value decomposition.

4. Can Matlab handle large-scale linear algebra problems?

Yes, Matlab has the capability to handle large-scale linear algebra problems through its ability to store and manipulate large arrays and matrices efficiently. It also has parallel computing features that can speed up computations for larger problems.

5. Are there any resources available for learning Linear Algebra and Matlab?

Yes, there are many resources available for learning Linear Algebra and Matlab, including online tutorials, textbooks, and courses. Some universities also offer online or in-person classes specifically for Linear Algebra and Matlab. Additionally, Matlab has a comprehensive documentation and community forums where users can find help and support.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
724
  • Science and Math Textbooks
Replies
17
Views
1K
  • Precalculus Mathematics Homework Help
Replies
32
Views
838
  • Precalculus Mathematics Homework Help
2
Replies
57
Views
3K
  • Calculus and Beyond Homework Help
Replies
25
Views
2K
  • Engineering and Comp Sci Homework Help
2
Replies
48
Views
4K
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Linear and Abstract Algebra
Replies
8
Views
1K
Back
Top