# Mat

`verb.core.Mat`

CLASS

Source code

Tools for working with matrices

## mul

STATIC METHOD

Source code

`mul(a : Float, b : Matrix) : Matrix`

Multiply a `Matrix` by a constant

## mult

STATIC METHOD

Source code

`mult(x : Matrix, y : Matrix) : Matrix`

Multiply two matrices assuming they are of compatible dimensions.

Based on the numeric.js routine - `numeric.dotMMsmall`

## add

STATIC METHOD

Source code

`add(a : Matrix, b : Matrix) : Matrix`

Add two matrices

## div

STATIC METHOD

Source code

`div(a : Matrix, b : Float) : Matrix`

Divide each of entry of a Matrix by a constant

## sub

STATIC METHOD

Source code

`sub(a : Matrix, b : Matrix) : Matrix`

Subtract two matrices

## dot

STATIC METHOD

Source code

`dot(a : Matrix, b : Vector) : Vector`

Multiply a `Matrix` by a `Vector`

## identity

STATIC METHOD

Source code

`identity(n : Int) : Matrix`

Build an identity matrix of a given size

## transpose

STATIC METHOD

Source code

`transpose<T>(a : Array<Array<T>>) : Array<Array<T>>`

Transpose a matrix

## solve

STATIC METHOD

Source code

`solve(A : Matrix, b : Vector) : Vector`

Solve a system of equations