Description Usage Arguments Details Value Author(s) See Also Examples
IsIdempotent()
returns TRUE
if A
is an idempotent matrix,
and FALSE
otherwise.
1 2 3 4 5 6 7 | IsIdempotent(A, ...)
## Default S3 method:
IsIdempotent(A, tol = 1e-08, ...)
## S3 method for class 'yac_symbol'
IsIdempotent(A, ...)
|
A |
Input. |
... |
... |
tol |
Numeric. Tolerance. |
An m \times m matrix \mathbf{A} is idempotent if
\mathbf{A}^2 = \mathbf{A} .
A
is considered to be an idempotent matrix
if all(abs(A %*% A - A) <= tol)
returns TRUE
.
Logical.
Ivan Jacob Agaloos Pesigan
Other predicate functions:
IsDiagonal()
,
IsInvertible()
,
IsMatrix()
,
IsNilpotent()
,
IsOrthogonal()
,
IsPositiveDefinite()
,
IsScalar()
,
IsSingular()
,
IsSquareMatrix()
,
IsSymmetric()
,
IsVector()
,
MatrixCheck()
1 2 3 4 5 | # TRUE
IsIdempotent(matrix(data = c(1, 0, 0, 1), ncol = 2))
# FALSE
IsIdempotent(matrix(data = 1, nrow = 2, ncol = 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.