Linear Algebra Archives - Ben Barbour

Matrix Library: Part 3 (Covariance)

The sample covariance matrix describes how the elements of the matrix relate to eachother. It is used, as you might have guessed, in computer vision as well as machine learning. http://en.wikipedia.org/wiki/Covariance_matrix

The algorithm for determining the covariance of a matrix is relatively simple. Step 1: Get the mean of the matrix and subtract it […]

Matrix Library: Part 2 (Gaussian Elimination)

Row Reduced Echelon Form Without actually turning this into a linear algebra lesson, this method is used to solve a linear system of equations such as: 2x + 3y – 2z = 1 5x – 5y + 9z = 7 4x + 4y – 3z = 9 As you remember from algebra class, you can […]

Matrix Library: Part 1

Presented here is a robust (though naive) 2D matrix library written in C. Commercial applications of course would be better served with libraries such as OpenCV or a version of LAPACK/BLAS. Below I will describe some of its more interesting features. The matrix struct

As you can see, the matrix itself is implemented as […]