Q:

How do you calculate an inverse matrix in Matlab?

A:

It is easy to find the inverse of a matrix in MATLAB. Input the matrix, then use MATLAB's built-in inv() command to get the inverse.

Keep Learning

Credit: Alys Tomlinson Cultura Getty Images

1. Input the matrix in MATLAB

Open MATLAB, and put the cursor in the console window. Choose a variable name for the matrix, and type it in the window. For instance, if the matrix is called "A," type "A = " in the console window. Now, type "[" (left square bracket), followed by the entries of the matrix, type the entries of the matrix, using a semi-colon at the end of each row. Finally, type "]" (right square bracket), and hit the "Enter" key.

2. Use MATLAB's built-In command to find the inverse

In the console window, type "inv(". Then type your variable name, followed by ")". For instance, if the matrix is called "A," type "inv(A)."

The inverse of A appears on the screen, and the process is complete. If MATLAB outputs an error message, it may be necessary to troubleshot. Not all matrices are invertible, and MATLAB will not be able to find an inverse matrix if no inverse exists. If MATLAB gives an error, make sure that the matrix is square (same number of rows as columns) and that no errors were made in typing the entries of A.

Sources:

Related Questions

• A: A modular inverse of a number a(modulo m) is the integer a^-1, such that a * a^-1 is equivalent to 1 (modulo m). Every integer a, except 0, has an inverse ... Full Answer >
Filed Under:
• A: In math, inverse is explained as the opposite in effect. An inverse function is one that reverses another function. If an inverse does exist for a function... Full Answer >
Filed Under:
• A: An orthogonal matrix is a square matrix with real entries whose columns and rows are orthogonal unit vectors or orthonormal vectors. Similarly, a matrix Q ... Full Answer >
Filed Under:
• A: A singular matrix, also called degenerate matrix, is a square matrix whose determinant is zero and that doesn't have a matrix inverse. It's rare to come ac... Full Answer >
Filed Under:
PEOPLE SEARCH FOR