IsSingular
Tests if a square matrix is singular.
Syntax
-
IsSingular(A)-
Ais a square matrix
-
Description
If A is a square matrix of size n, then IsSingular(A) returns true iff A is singular.
The following are equivalent:
-
Ais NOT singular. -
det(A) ≠ 0. -
rank(A) = n. -
The columns of
Aare linearly independent. -
The rows of
Aare linearly independent. -
Ais invertible. -
The matrix equation
AX = Yhas a unique solutionXfor everyY. -
0 ∉ spectrum(A).
Examples
A ≔ ❨❨5, 3, 2, 1❩, ❨−2, 5, 1, −2❩, ❨1, −2, 3, 1❩, ❨4, 6, 6, 0❩❩
⎛ 5 3 2 1⎞ ⎜−2 5 1 −2⎟ ⎜ 1 −2 3 1⎟ ⎝ 4 6 6 0⎠
IsSingular(A)
true
'(det(A), rank(A), #cols(ColumnSpaceBasis(A)), IsZero(min(spectrum(A) @ abs)))
0 3 3 true