View source: R/gaussian-elimination.R
Inverse | R Documentation |
Uses gaussianElimination
to find the inverse of a square, non-singular matrix, X
.
Inverse(X, tol = sqrt(.Machine$double.eps), verbose = FALSE, ...)
X |
a square numeric matrix |
tol |
tolerance for checking for 0 pivot |
verbose |
logical; if |
... |
other arguments passed on |
The method is purely didactic: The identity matrix, I
, is appended to X
, giving
X | I
. Applying Gaussian elimination gives I | X^{-1}
, and the portion corresponding
to X^{-1}
is returned.
the inverse of X
John Fox
A <- matrix(c(2, 1, -1,
-3, -1, 2,
-2, 1, 2), 3, 3, byrow=TRUE)
Inverse(A)
Inverse(A, verbose=TRUE, fractions=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.