← Mathematical Foundations

01 · Lesson 06

Linear algebra and matrices

Linear algebra organises several related quantities and the rules connecting them. Vectors store biological states; matrices transform those states, describe transitions, or represent interactions.

Scenario: a stage-structured population

A population contains juveniles and adults. Juveniles may survive and mature, while adults survive and produce new juveniles. We want to update both groups together without writing separate calculations repeatedly.

Store the current state in a column vector:

\[\mathbf n_k=\begin{pmatrix}J_k\\A_k\end{pmatrix}.\]

The order is part of the definition: the first component is juvenile and the second is adult.

Scalars, vectors and matrices

ObjectExampleRole
Scalar\(0.8\)One number, such as a survival probability
Vector\((J,A)^T\)An ordered list of state quantities
Matrix\((a_{ij})\)A rectangular array representing a transformation

An \(m\times n\) matrix has \(m\) rows and \(n\) columns. It can multiply a vector with \(n\) components and produces a vector with \(m\) components.

A population projection matrix

Consider

\[L=\begin{pmatrix}0&1.5\\0.4&0.8\end{pmatrix},\qquad \mathbf n_{k+1}=L\mathbf n_k.\]

Multiplication gives

\[J_{k+1}=1.5A_k,\qquad A_{k+1}=0.4J_k+0.8A_k.\]

Rows identify the receiving class; columns identify the contributing class. The entry \(0.4\) says that each current juvenile contributes an expected \(0.4\) adults to the next census.

Matrix multiplication

For \(C=AB\), entry \(c_{ij}\) is the dot product of row \(i\) of \(A\) with column \(j\) of \(B\):

\[c_{ij}=\sum_k a_{ik}b_{kj}.\]

The inner dimensions must match. In general \(AB\ne BA\), because reversing transformations usually changes both their meaning and their result.

Never multiply matrices only because their numerical sizes permit it. Define what rows, columns and the direction of transformation represent.

Important matrices

Linear systems

A system \(A\mathbf x=\mathbf b\) asks for a vector whose transformation by \(A\) produces \(\mathbf b\). A unique solution exists when the square matrix \(A\) is invertible:

\[\mathbf x=A^{-1}\mathbf b.\]

In computation, direct numerical solvers are normally preferred to explicitly calculating \(A^{-1}\). Singular or nearly singular matrices may indicate non-identifiable effects or numerically unstable calculations.

Repeated updating

Applying the same projection for \(k\) steps gives

\[\mathbf n_k=L^k\mathbf n_0.\]

The long-term pattern depends on the structure of \(L\), especially its eigenvalues and eigenvectors. Those are introduced in the next lesson.

Conditions and interpretation

What this lesson adds

You can now interpret scalars, vectors and matrices, construct a structured-population update, perform meaningful matrix multiplication, recognise important matrix types and explain why repeated matrix transformations matter in biology.