matlib0.9.8 package

Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics

adjoint

Calculate the Adjoint of a matrix

angle

Angle between two vectors

arc

Draw an arc showing the angle between vectors

arrows3d

Draw 3D arrows

buildTmat

Build/Get transformation matrices

cholesky

Cholesky Square Root of a Matrix

circle

Draw circles on an existing plot.

circle3d

Draw a horizontal circle

cofactor

Cofactor of A[i,j]

cone3d

Draw a 3D cone

corner

Draw a corner showing the angle between two vectors

Ginv

Generalized Inverse of a Matrix

Det

Determinant of a Square Matrix

echelon

Echelon Form of a Matrix

Eigen

Eigen Decomposition of a Square Symmetric Matrix

gaussianElimination

Gaussian Elimination

getYmult

Correct for aspect and coordinate ratio

tr

Trace of a Matrix

GramSchmidt

Gram-Schmidt Orthogonalization of a Matrix

gsorth

Gram-Schmidt Orthogonalization of a Matrix

Inverse

Inverse of a Matrix

is_square

Test for square matrix

J

Create a vector, matrix or array of constants

len

Length of a Vector or Column Lengths of a Matrix

vandermode

Vandermode Matrix

vec

Vectorize a Matrix

LU

LU Decomposition

matlib-package

matlib: Matrix Functions for Teaching and Learning Linear Algebra and ...

matrix2latex

Convert matrix to LaTeX equation

minor

Minor of A[i,j]

MoorePenrose

Moore-Penrose inverse of a matrix

mpower

Matrix Power

plot.regvec3d

Plot method for regvec3d objects

plotEqn

Plot Linear Equations

plotEqn3d

Plot Linear Equations in 3D

pointOnLine

Position of a point along a line

powerMethod

Power Method for Eigenvectors

printMatEqn

Print Matrices or Matrix Operations Side by Side

printMatrix

Print a matrix, allowing fractions or LaTeX output

Proj

Projection of Vector y on columns of X

QR

QR Decomposition by Graham-Schmidt Orthonormalization

R

Rank of a Matrix

regvec3d

Vector space representation of a two-variable regression model

rowadd

Add multiples of rows to other rows

rowCofactors

Row Cofactors of A[i,]

rowMinors

Row Minors of A[i,]

rowmult

Multiply Rows by Constants

rowswap

Interchange two rows of a matrix

showEig

Show the eigenvectors associated with a covariance matrix

showEqn

Show Matrices (A, b) as Linear Equations

Solve

Solve and Display Solutions for Systems of Linear Simultaneous Equatio...

SVD

Singular Value Decomposition of a Matrix

svdDemo

Demonstrate the SVD for a 3 x 3 matrix

swp

The Matrix Sweep Operator

symMat

Create a Symmetric Matrix from a Vector

vectors

Draw geometric vectors in 2D

vectors3d

Draw 3D vectors

xprod

Generalized Vector Cross Product

A collection of matrix functions for teaching and learning matrix linear algebra as used in multivariate statistical methods. These functions are mainly for tutorial purposes in learning matrix algebra ideas using R. In some cases, functions are provided for concepts available elsewhere in R, but where the function call or name is not obvious. In other cases, functions are provided to show or demonstrate an algorithm. In addition, a collection of functions are provided for drawing vector diagrams in 2D and 3D.

  • Maintainer: Michael Friendly
  • License: GPL (>= 2)
  • Last published: 2024-07-25