Skip to contents

Calculates the inverse of a square matrix.

Usage

inv(x, ...)

Arguments

x

A square numeric or complex matrix.

...

Additional optional arguments.

Details

See solve for details.

See also

Examples

m <- 3 * eye(5)
inv(m)
#>           [,1]      [,2]      [,3]      [,4]      [,5]
#> [1,] 0.3333333 0.0000000 0.0000000 0.0000000 0.0000000
#> [2,] 0.0000000 0.3333333 0.0000000 0.0000000 0.0000000
#> [3,] 0.0000000 0.0000000 0.3333333 0.0000000 0.0000000
#> [4,] 0.0000000 0.0000000 0.0000000 0.3333333 0.0000000
#> [5,] 0.0000000 0.0000000 0.0000000 0.0000000 0.3333333