IsSingular
Tests if a square matrix is singular.
Syntax
-
IsSingular(A)
-
A
is 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:
-
A
is NOT singular. -
det(A) ≠ 0
. -
rank(A) = n
. -
The columns of
A
are linearly independent. -
The rows of
A
are linearly independent. -
A
is invertible. -
The matrix equation
AX = Y
has a unique solutionX
for 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