Jump to content

Science:Math Exam Resources/Courses/MATH152/April 2011/Question A 21/Solution 1

From UBC Wiki

One would use the backslash operator '\', and store the answer into a vector called 𝐱. The full command in your MATLAB console would look like

x = A\b;

Note that

x = inv(A)*b;

would also work, but requires to compute the inverse of A first. There is better ways of solving Ax=b than that, and x= A\b is one of them. It does not use the inverse matrix (which is costly to compute).