1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Linear Algebra: Matlab Question

  1. Feb 13, 2017 #1
    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. The problem statement, all variables and given/known data

    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:


    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)

    2. Relevant equations
    Here are the matrices from problem 1:
    M1: [2,3;4,5]
    M2: [1,-2,0;4,-7,1;0,3,5]

    3. 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.
    I figured it out.

    % Let A= Matrix, Let IM= Identity matrix

    Ugh.... so simple.... I wish that I didn't waste so much time on this problem.

    Thank you for looking.
    Last edited: Feb 13, 2017
  2. jcsd
  3. Feb 14, 2017 #2


    User Avatar

    Staff: Mentor

    I don't see how this solves the problem you are asked.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted