mathematics//linear algebra

Linear algebra is the branch of mathematics that studies linear combinations, vector spaces and the transformations that preserve those combinations, and engineering uses it to write and solve any problem with more than one variable. A matrix represents a transformation in chosen coordinates; multiplying it by a vector computes the transformed coordinates. Changing the basis changes the representation without necessarily changing the underlying operation.


Linear algebra is the branch of mathematics that studies linear combinations, vector spaces and the transformations that preserve those combinations, and engineering uses it to write and solve any problem with more than one variable. A matrix represents a transformation in chosen coordinates; multiplying it by a vector computes the transformed coordinates. Changing the basis changes the representation without necessarily changing the underlying operation.

This is the language in which engineering writes anything with more than one variable: vectors describe states and data, matrices describe transformations. A drone's state and its dynamics, a circuit's node voltages, a network of tanks, a table of sensor data, a layer of a neural network and the rotation from body axes to Earth axes are all multiply by a matrix. Collecting many scalar relationships into one matrix equation is what makes them solvable together, and linearization explains how a nonlinear model yields a local linear approximation around an operating point, which is how most real controllers and filters get their matrices. What an engineer uses every week is a small subset, and its members answer distinct questions.

The first is what a matrix does. Read as a linear transformation, its columns say where each axis lands; its rank counts the directions that survive, its null space holds what it destroys (the unobservable states of an estimator live there), and its determinant gives the volume factor and, for two states, the saddle test. Two kinds of matrix deserve their own names because they move without deforming: the orthogonal matrix, numerically perfect, and the rotation that carries IMU readings between frames, stored in autopilots as a quaternion.

The second is what a matrix does when repeated, which is the question of dynamics. Eigenvalues find the directions in which a coupled system falls apart into independent pieces, the spectral radius decides whether a repeated step dies out or explodes, the non-normal matrix warns that stable eigenvalues can still hide a large transient, and the matrix exponential turns a continuous model into the exact discrete one a computer runs.

The third is how to undo a matrix with real data. A linear system of equations has one, none or infinitely many solutions depending on its shape; with more measurements than unknowns the answer is least squares, an orthogonal projection; how many digits survive is the condition number. All of it runs on a matrix factorization (LU, QR, Cholesky, SVD, eigendecomposition), and whether an eigenvalue seen in data is structure or noise is answered by random matrix theory.

Do not reinvent it, and never invert.

NumPy and SciPy call LAPACK and BLAS, decades of optimization no hand-written loop matches; solve and lstsq factorize instead of forming A−1A^{-1}A−1, and scaling the variables first fixes half of all numerical trouble. GPUs are, literally, machines for multiplying matrices, which is why deep learning runs on them (GPU).