solve2: Computes the inverse of a matrix

Description Usage Arguments Details Value Author(s) References Examples

View source: R/solve2.R

Description

Computes the inverse of a matrix using the LU decomposition.

Usage

1
solve2(A)

Arguments

A

an invertible square matrix.

Details

Use the LU decomposition to compute the inverse of a matrix. In some cases, solve produces error to invert a matrix whereas this decomposition provide a valid solution.

Value

A square matrix corresponding to the inverse of A.

Author(s)

Clecio Ferreira, Diego Gallardo and Camila Zeller

References

Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.

Horn, R. A. and C. R. Johnson (1985). Matrix Analysis, Cambridge University Press.

Examples

1
2
A=matrix(c(1,2,5,6),ncol=2)
solve2(A)

skewMLRM documentation built on Nov. 24, 2021, 9:07 a.m.

Related to solve2 in skewMLRM...