Products & Services Solutions Academia Support User Community Company

Learn more about Symbolic Math Toolbox   

inv - Compute symbolic matrix inverse

Syntax

R = inv(A)

Description

R = inv(A) returns inverse of the symbolic matrix A.

Examples

Compute the inverse of the following matrix of symbolic numbers:

A = sym([2,-1,0;-1,2,-1;0,-1,2]);
inv(A)

The result is:

ans =
[ 3/4, 1/2, 1/4]
[ 1/2,   1, 1/2]
[ 1/4, 1/2, 3/4]
 

Compute the inverse of the following symbolic matrix:

syms a b c d
A = [a b; c d];
inv(A)

The result is:

ans =
[  d/(a*d - b*c), -b/(a*d - b*c)]
[ -c/(a*d - b*c),  a/(a*d - b*c)]
 

Compute the inverse of the symbolic Hilbert matrix:

inv(sym(hilb(4)))

The result is:

ans =
[   16,  -120,   240,  -140]
[ -120,  1200, -2700,  1680]
[  240, -2700,  6480, -4200]
[ -140,  1680, -4200,  2800]

See Also

det | eig | rank

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS