Performs various linear algebra operations like finding the inverse, the QR decomposition, the eigenvectors and the eigenvalues.

columnspace(x)

nullspace(x)

rowspace(x)

singular_values(x)

inv(x)

eigenval(x)

eigenvec(x)

GramSchmidt(x)

pinv(x)

rref(x)

QRdecomposition(x)

det(x, ...)

Arguments

x

A matrix for which a property is requested

...

Auxillary arguments

Value

Returns the requested property of a matrix.

See also

Examples

if (has_sympy()) {
  A <- matrix(c("a", "0", "0", "1"), 2, 2) %>% as_sym()
  
  QRdecomposition(A)
  eigenval(A)
  eigenvec(A)
  inv(A)
  det(A)
  
  
  A <- matrix(c("a", "b", "c", "d"), 2, 2) %>% as_sym()
  evec <- eigenvec(A)
  evec
  evec1 <- evec[[1]]$eigvec
  evec1
  simplify(evec1)
  
  lapply(evec, function(l) simplify(l$eigvec))

  A <- as_sym("[[1, 2, 3], [4, 5, 6]]")
  pinv(A)
}
#> [caracas]: ⎡-17       ⎤
#>            ⎢────  4/9 ⎥
#>            ⎢ 18       ⎥
#>            ⎢          ⎥
#>            ⎢-1/9  1/9 ⎥
#>            ⎢          ⎥
#>            ⎢ 13       ⎥
#>            ⎢ ──   -2/9⎥
#>            ⎣ 18       ⎦