jonathanfishbein1/linear-algebra/3.0.0

NOTE: the latest version is 30.0.0

Matrix

A module for Matrix

Types

type Matrix a
= Matrix (List (RowVector a))

Matrix type

type RowVector a
= RowVector (Vector a)

Row Vector

= ColumnVector (Vector a)

Column Vector

= UniqueSolution (ColumnVector Float)
| NoUniqueSolution String

Type to represent result of Gauss-Jordan reduction

addRealMatrices : Matrix number -> Matrix number -> Matrix number

Add two Real Matrices together

Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)

Add two Complex Matrices together

sumRealMatrices : Matrix number -> Monoid (Matrix number)

Monoidally add two Real numbered Matrices together

Matrix (ComplexNumberCartesian number)
-> Monoid (Matrix (ComplexNumberCartesian number))

Monoidally add two Complex numbered Matrices together

map : (a -> b) -> Matrix a -> Matrix b

Map over a Matrix

equal : (a -> a -> Bool) -> Matrix a -> Matrix a -> Bool

Compare two Matrices for equality

Transpose a Matrix

Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)

Take the complex conjugate of a Complex Numbered Matrix

Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)

Perform the adjoint operation on a Complex Numbered Matrix

apply : Matrix (a -> b) -> Matrix a -> Matrix b

Apply for Matrix

liftA2 : (a -> b -> c) -> Matrix a -> Matrix b -> Matrix c

Lift a function to work on Matrix

Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)
-> Matrix (ComplexNumberCartesian number)

Matrix Matrix multiplication for a Complex Numbered Matrix

multiplyRealMatrices : Matrix number -> Matrix number -> Matrix number

Matrix Matrix multiplication for a Real Numbered Matrix

identityMatrix : Int -> Matrix Int

Create Identity Matrix with n dimension

findPivot : Matrix number -> Int -> Maybe Int

Internal function for finding pivot entry in Gaussian elimination

gaussJordan : Matrix Float -> ColumnVector Float -> Matrix Float

Internal function composition of Gaussian Elimination and Jordan Elimination

gaussianReduce : Matrix Float -> ColumnVector Float -> Matrix Float

Internal function Gaussian Elimination

isHermitian : Matrix (ComplexNumberCartesian number) -> Bool

Predicate to determine if Matrix is Hermitian

isSymmetric : Matrix a -> Bool

Predicate to determine if Matrix is symmetric

jordanReduce : Matrix Float -> Matrix Float

Internal function for Jordan Elimination

areLinearlyIndependent : List (RowVector Float) -> Bool

Predicate to determine if a list of Vectors are linearly independent

multiplyRealVectorRealMatrix : Matrix number -> Vector number -> Matrix number

Multiply a real Vector by a real Matrix

Calculate the null space of a matrix

scale : Int -> RowVector Float -> RowVector Float

Internal function for scalling rows by pivot entry

solve : Matrix Float -> ColumnVector Float -> Solution

Solve a system of linear equations using Gauss-Jordan elimination

subrow : Int -> RowVector Float -> RowVector Float -> RowVector Float

Internal function for subtracting rows from each other

swap : Matrix a -> Int -> Int -> Matrix a

Swap two rows of a matrix