fBasics (version 3011.87)

inv: The Inverse of a Matrix

Description

Returns the inverse of a matrix.

Usage

inv(x)

Arguments

x
a numeric matrix.

Value

returns the inverse matrix.

References

Golub, van Loan, (1996); Matrix Computations, 3rd edition. Johns Hopkins University Press.

Examples

Run this code
## Create Pascal Matrix:
   P = pascal(5)
   P
         
## Compute the Inverse Matrix:
   inv(P)
   
## Check:
   inv(P) 
   
## Alternatives:
   chol2inv(chol(P))
   solve(P)                     

Run the code above in your browser using DataLab