MathEclipse:Linear Algebra

Linear Algebra Examples

Create a vector:

$v={10,11,12}

Create a matrix:

$m={{1, 2, 3}, {3, 4, 11}, {13, 7, 8}}

Compute the inverse of a matrix

$inv=Inverse[$m]

To multiply 2 matrices use the . operator

$m.$inv

For multiplying a matrix with a vector you can also use the . operator

$m.$v

or

$v.$m

The power of a matrix can be computed with the MatrixPower[] function:

MatrixPower[$m, 10]

Compute the determinant of a matrix

$det=Det[$m]

Use the * operator to multiply all elements of the matrix with a scalar

$m*$det

Compute the LU decomposition of the matrix

$lum=LUDecomposition[$m]

Check the result by multiplying the matrix $m with the vector $x:

$m.$x