How Do You Calculate an Inverse Matrix in Matlab?
It is easy to find the inverse of a matrix in MATLAB. Input the matrix, then use MATLAB’s builtin inv() command to get the inverse.

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 semicolon at the end of each row. Finally, type “]” (right square bracket), and hit the “Enter” key.

Use MATLAB’s builtIn 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).”

Get the answer
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.