Matlab-Matrix Tutorial
Selected Reading
- Matlab Matrix - Discussion
- Matlab Matrix - Useful Resources
- Matlab Matrix - Quick Guide
- Matlab-Matrix - Deletion Row & Coloumn
- Matlab-Matrix - Transpose
- Matlab-Matrix - Rank
- Matlab-Matrix - Trace
- Matlab-Matrix - Inverse
- Matlab-Matrix - Matrix Determinant
- Matlab-Matrix - Subtraction
- Matlab-Matrix - Addition
- Matlab-Matrix - Multiplication
- Matlab-Matrix - Working with Matrices
- Matlab-Matrix - Create Matrix
- Matlab-Matrix - Environment Setup
- Matlab-Matrix - Introduction
- Matlab-Matrix - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Matlab-Matrix - Inverse
Matlab-Matrix - Inverse
The inverse of a matrix A is denoted by A−1 such that the following relationship holds −
AA−1 = A−1A = 1
The inverse of a matrix does not always exist. If the determinant of the matrix is zero, then the inverse does not exist and the matrix is singular.
Inverse of a matrix in MATLAB is calculated using the inv function. Inverse of a matrix A is given by inv(A).
Example
Here is an example to calculate inverse of given matrix −
a = [ 1 2 3; 2 3 4; 1 2 5]; test = inv(a)
Output
The execution in MATLAB gives following result −
>> a = [ 1 2 3; 2 3 4; 1 2 5]; test = inv(a) test = -3.5000 2.0000 0.5000 3.0000 -1.0000 -1.0000 -0.5000 0 0.5000 >>Advertisements