Eigen_kernel: Kernel of a matrix

View source: R/EigenR.R

Eigen_kernelR Documentation

Kernel of a matrix

Description

Kernel (null-space) of a real or complex matrix.

Usage

Eigen_kernel(M, method = "COD")

Arguments

M

a matrix, real or complex

method

one of "COD" or "LU"; the faster method depends on the size of the matrix

Value

A basis of the kernel of M. With method = "COD", the basis is orthonormal, while it is not with method = "LU".

Examples

set.seed(666)
M <- matrix(rgamma(30L, 12, 1), 10L, 3L)
M <- cbind(M, M[,1]+M[,2], M[,2]+2*M[,3])
# basis of the kernel of `M`:
Eigen_kernel(M, method = "LU")
# orthonormal basis of the kernel of `M`:
Eigen_kernel(M, method = "COD")

EigenR documentation built on May 18, 2022, 9:05 a.m.