IsNilpotent: Test for a Nilpotent Matrix

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

View source: R/IsNilpotent.R

Description

IsNilpotent() returns TRUE if A is a nilpotent matrix, and FALSE otherwise.

Usage

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

Arguments

A

Input.

tol

Numeric. Tolerance.

Details

An m \times m matrix \mathbf{A} is nilpotent if all the eigenvalues are zero.

A is considered to be a nilpotent matrix if the absolute value of all eigenvalues is less than or equal to a tolerance value.

Value

Logical.

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Nilpotent matrix

See Also

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

Examples

1
2
3
4
5
# TRUE
IsNilpotent(matrix(data = c(0, 0, 1, 0), ncol = 2))

# FALSE
IsNilpotent(matrix(data = c(1, 0, 0, 0), ncol = 2))

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