A square matrix (array of rows).
Optionalb: undefined
Omit (or pass undefined) to compute the inverse.
Optionaloptions: SolveOptions
See SolveOptions.
The inverse of a as an array of rows.
Solves the linear system a x = b for a vector b, as R's solve(a, b).
Throws if a is exactly singular or its estimated reciprocal condition number is below tol.
A square matrix (array of rows).
The right-hand side vector, with as many elements as a has rows.
Optionaloptions: SolveOptions
See SolveOptions.
The solution x as a vector.
Solves the linear system a x = b for a matrix b.
A square matrix (array of rows).
The right-hand side matrix (array of rows), with as many rows as a.
Optionaloptions: SolveOptions
See SolveOptions.
The solution x as an array of rows.
Solves the linear system a x = b, or inverts a when b is omitted.
A square matrix (array of rows).
Optionalb: VectorOrMatrix
The right-hand side, a vector or a matrix. Omit to compute the inverse.
Optionaloptions: SolveOptions
See SolveOptions.
A vector if b is a vector, otherwise an array of rows.
Inverse of a square matrix. Equivalent to R's
solve(a).Uses an LU decomposition with partial pivoting. Throws if the matrix is exactly singular or if its estimated reciprocal condition number is below
tol(the check is skipped for matrices withNaNor infinite values).