IsSingular: Test for a Singular Matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/IsSingular.R

Description

IsInvertible() returns TRUE if A is a singular matrix, and FALSE otherwise.

Usage

1
IsSingular(A, tol = 1e-08)

Arguments

A

Input.

tol

Numeric. Tolerance.

Details

An m \times m matrix \mathbf{A} is singular if its determinant is zero.

The function compares the determinant of \mathbf{A} to a tolerance value. If the determinant is less than or equal to a tolerance value, the matrix is assumed to be singular.

Value

Logical.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other predicate functions: IsDiagonal(), IsIdempotent(), IsInvertible(), IsMatrix(), IsNilpotent(), IsOrthogonal(), IsPositiveDefinite(), IsScalar(), IsSquareMatrix(), IsSymmetric(), IsVector(), MatrixCheck()

Examples

1
2
3
4
5
# TRUE
IsSingular(matrix(1, nrow = 2, ncol = 2))

# FALSE
IsSingular(diag(2))

jeksterslab/matrixR documentation built on Feb. 22, 2021, 8:10 a.m.