Linear algebra in caracas

Mikkel Meyer Andersen and Søren Højsgaard

Mon Jul 5 12:29:14 2021

1 Introduction

This vignette is based on caracas version r packageVersion("caracas"). caracas is avavailable on CRAN at [] and on github at [].

2 Elementary matrix operations

2.1 Creating matrices / vectors

We now show different ways to create a symbolic matrix:

Note that a vector is a matrix in which one of the dimensions is one.

2.2 Matrix-matrix sum and product

2.3 Hadamard (elementwise) product

2.4 Vector operations

2.5 Reciprocal matrix

2.6 Matrix inverse; solve system of linear equations

Solve \(Ax=b\) for \(x\):

2.7 Generalized (Penrose-Moore) inverse; solve system of linear equations [TBW]

3 More special linear algebra functionality

Below we present convenient functions for performing linear algebra operations. If you need a function in SymPy for which we have not supplied a convinience function (see, you can still call it with the do_la() (short for “do linear algebra”) function presented at the end of this section.

3.1 QR decomposition

3.2 Eigenvalues and eigenvectors

3.3 Inverse, Penrose-Moore pseudo inverse

3.4 Additional functionality for linear algebra

do_la short for “do linear algebra”

The above functions can be called: