Matrices are everywhere - computer science, engineering, movies, and, of course, linear algebra.
Before we can understand why matrices are such a useful tool in many fields, it is important to understand what exactly a matrix can represent.
At the core level, a matrix is an array of elements with rows and columns. This idea of a matrix is a type of data structure used in computer science to store lists that have some form of overlap. For example, a matrix could represent a collection of students and their grades in a variety of classes. The rows could be classes, the columns students, and the intersection is the specific student’s grade in the specific class.
This introductory example leads nicely to the next idea of a matrix being a list of lists. Each student has a list of grades in all the classes, and our matrix becomes a list of each student’s grade list. This transitions to the use of matrices in linear algebra, the representation of linear maps.
For the purposes of this article, it is important to know linear maps are functions between vector spaces. A matrix can be formed for a linear map using the basis elements of both the domain and the codomain, with each column representing the coefficients of a linear combination of basis elements in the codomain mapped to by a basis element of the domain. For future reference, an m-by-n matrix, meaning m rows and n columns, the number of columns is the dimension of the domain, and the number of rows is the dimension of the codomain. For large vector spaces, these matrices provide an easier way to perform computations with matrix operations.
One of my personal favorite examples of the use of matrices is in engineering as part of a process called Finite Element Analysis, or FEA. For a bit of context, FEA is used to analyze designs in engineering by taking objects and breaking them into discrete vertices, lines, faces, etc. FEA can be used for physics simulations, so things as structural or thermal analysis. The true depth of FEA is beyond the scope of this article, but the relation to linear algebra illustrates the applications of these concepts. The matrices used in FEA look as follows
This example is for a bar defined by two points that can only stretch in one axis as more degrees of freedom or more points greatly complicate the matrix. The stiffness matrix is the matrix of a linear map with the domain being displacement vectors and the codomain of force vectors. The columns of the stiffness represent the components of the force vector that is mapped to by displacements along each axis. For structural analysis, this matrix will always be a square matrix because the dimensions of forces and displacements must be the same. All the maps between displacement and force vectors create a system of linear equations, which computers are rather proficient at computing.
Since this method defines displacement on points but uses the bars between the points for the equations, adding more points creates a larger matrix with the diagonal populated by overlapping 2x2 matrices such as the one shown. This is because some points are attached to bars on each side and thus are related to both when doing calculations.
The finite element of analysis of the simple example could take a few minutes to calculate by hand depending on exactly what is being asked for, but computers can compute thousands of elements in seconds with more complex structures. The example, which is at its core just points and lines as discussed, shows the computational complexity of a process that seems conceptually understandable at the level presented.
Much of the engineering analysis that keeps bridges and buildings standing is built on the foundations of linear algebra and matrices brought to an unfathomable scale. Matrices are something that may be familiar to many readers, but the value of the matrices comes from the underlying linear algebra.
Contributors: Joseph Brewster