Matrices

Overview

One of the primary tools of linear algebra is the matrix. A matrix is a rectangular arrangement of numbers, as in
{% \begin{bmatrix} a & b & c \\ d & e & f\\ g & h & i \\ \end{bmatrix} %}


Matrices need not be square. When a matrix has a single row or single column, we refer to them as vectors. (see matrix vectors)

A row vector is defined to be a matrix that has a single row. ({% 1 \times n %} matrix)
{% \begin{bmatrix} a & b & c \\ \end{bmatrix} %}
A column vector is defined to be a matrix with a single column ({% n \times 1 %} matrix) :
{% \begin{bmatrix} a \\ c \\ e \\ \end{bmatrix} %}


Linear Algebra defines how to add and multiply these objects. Matrix algebra finds its utility in being able to simplify large sets of equations into a fewer, sometimes, single equation.

Matrices are representations of linear transformations.

Topics

Matrix Decompositions

A matrix decomposition is a method for finding a set of other matrices that when multiplied together result in the original matrix. Matrix decompositions are useful for both writing efficient numeric algorithms, as well as being useful in crafting multiple machine learning algorithms.

Matrix Algorithms

Matrix algorithms are common algorithms that compute some derived matrix or use matrices to accomplish some other goal.

Matrix api

A matrix wrapper library exists for the numeric library that assists in basic matrix manipulations.


let mt = await import("/lib/linear-algebra/v1.0.0/matrix.mjs");
	
let answer = mt.matrix([[2,2],[3,1]])
	.multiply([[1],[2]])
	.multiply([[0.3],[2.1]])
	.inverse()
	.toArray();
	


In addition to simplifying the code, the matrix module will also speed up some calculations because it will keep track of information, such as the form of the matrix, that cant easily be tracked in the simple array form.