Test if a numeric matrix is orthonormal, that is, each column is orthogonal,
at a right angle with the others, and each column has a norm
length of 1. This must be true for a projection to be linear.
Usage
is_orthonormal(x, tol = 0.001)
Arguments
x
Numeric matrix to test the orthonormality of.
tol
Max tolerance of floating point differences of the
element-wise distance of t(x) %*% x from the identity matrix.
Value
Single logical, whether or not the matrix is orthonormal.