Tutorials › Linear Algebra › Discrete-Time State Models as Matrix Recurrences

Applications in Networks, Economics and Data · Tutorial 959 of 1000

Discrete-Time State Models as Matrix Recurrences

Learn to turn one-period rules for a changing system into a matrix recurrence, and check whether the chosen state captures everything needed for the next update.

Intermediate 10 min read

What You'll Learn

  • Define a state vector for a discrete-time system.
  • Translate component update rules into a matrix recurrence.
  • Interpret matrix columns according to the source state variables.
  • Model inventory transfers and age-structured population changes.
  • Include outstanding orders in a state when they affect future inventory.
  • Recognize when a constant external input requires an augmented state.

From Update Rules to a State Vector

Many systems change in steps: inventory is recorded at the end of each week, or population counts are recorded once per breeding season. To model such a system, first decide which quantities must be known at time \(t\) to determine the state at time \(t+1\). Collect those quantities into a column vector \(\mathbf{x}_t\), called the state vector. A discrete-time linear state model with a fixed update rule has the form \(\mathbf{x}_{t+1}=\mathbf{A}\mathbf{x}_t\).

Here \(t\) indexes successive time steps, \(\mathbf{x}_t\in\mathbb{R}^n\), and \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is the update matrix. The equation describes one update only: multiply the current state column by \(\mathbf{A}\) to obtain the next state column. The matrix describes the rules; the vector describes the system at a particular time.

Definition: A discrete-time linear state model on \(\mathbb{R}^n\) is a sequence of states \(\mathbf{x}_t\in\mathbb{R}^n\), indexed by \(t=0,1,2,\dots\), that follows \(\mathbf{x}_{t+1}=\mathbf{A}\mathbf{x}_t\) for a fixed matrix \(\mathbf{A}\in\mathbb{R}^{n\times n}\). The model is linear because its update is multiplication by a matrix, with no added constant vector.

Writing down this equation is not just a matter of placing numbers in a matrix. The entries must match the meanings and order of the chosen state variables. If \(\mathbf{x}_t=(x_{1,t},\dots,x_{n,t})^{\top}\), then the \(i\)th component of the update is

$$ x_{i,t+1}=a_{i1}x_{1,t}+\cdots+a_{in}x_{n,t}. $$

Thus row \(i\) gives the rule for producing the next value of state variable \(i\). Column \(j\) records how the current value of state variable \(j\) contributes to all components of the next state. This row-and-column interpretation follows from using column vectors.

Why a Linear Update Has a Matrix

The connection between a linear rule and a matrix is exact. A linear map \(F:\mathbb{R}^n\to\mathbb{R}^n\) is a function satisfying \(F(a\mathbf{u}+b\mathbf{v})=aF(\mathbf{u})+bF(\mathbf{v})\) for all \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\) and \(a,b\in\mathbb{R}\). Its matrix has one column for each standard basis vector. The next result proves that this construction always represents the rule and determines the matrix uniquely.

Theorem: For every linear map \(F:\mathbb{R}^n\to\mathbb{R}^n\), there is a unique matrix \(\mathbf{A}\in\mathbb{R}^{n\times n}\) such that \(F(\mathbf{x})=\mathbf{A}\mathbf{x}\) for every \(\mathbf{x}\in\mathbb{R}^n\). Its \(j\)th column is \(F(\mathbf{e}_j)\), where \(\mathbf{e}_j\) is the \(j\)th standard basis vector.

Proof. Let \(\mathbf{e}_1,\dots,\mathbf{e}_n\) be the standard basis of \(\mathbb{R}^n\), and form \(\mathbf{A}\) by placing \(F(\mathbf{e}_1),\dots,F(\mathbf{e}_n)\) as its columns. Every \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\) has the expression \(\mathbf{x}=\sum_{j=1}^n x_j\mathbf{e}_j\). By linearity, \(F(\mathbf{x})=\sum_{j=1}^n x_jF(\mathbf{e}_j)=\mathbf{A}\mathbf{x}\), proving existence. If another matrix \(\mathbf{B}\) satisfies \(F(\mathbf{x})=\mathbf{B}\mathbf{x}\) for every \(\mathbf{x}\), then its \(j\)th column is \(\mathbf{B}\mathbf{e}_j=F(\mathbf{e}_j)\). Every column of \(\mathbf{B}\) therefore equals the corresponding column of \(\mathbf{A}\), so \(\mathbf{B}=\mathbf{A}\). \(\square\)

In applications, it is often more useful to start with component rules than with an abstract map. The same principle applies: express each next-state component as a linear combination of the current components, then place the coefficients into the corresponding row. The first worked example uses transfers between two inventory locations.

Worked Example: Inventory Moving Between Two Warehouses

Warehouse 1 sends one quarter of its stock to warehouse 2 each period. Warehouse 2 sends one third of its stock to warehouse 1. No stock is lost or added. Let \(x_{1,t}\) and \(x_{2,t}\) be the stock levels, and use \(\mathbf{x}_t=(x_{1,t},x_{2,t})^{\top}\).

Warehouse 1 retains three quarters of its own stock and receives one third of warehouse 2's stock. Warehouse 2 retains two thirds of its own stock and receives one quarter of warehouse 1's stock. Hence

$$ x_{1,t+1}=\frac34x_{1,t}+\frac13x_{2,t}, \qquad x_{2,t+1}=\frac14x_{1,t}+\frac23x_{2,t}. $$

The coefficients of the first rule form row 1, and the coefficients of the second rule form row 2. Therefore

$$ \mathbf{x}_{t+1} = \begin{bmatrix} \frac34&\frac13\\ \frac14&\frac23 \end{bmatrix}\mathbf{x}_t. $$

For a current state \(\mathbf{x}_t=(20,6)^{\top}\), the next state is

$$ \begin{bmatrix} \frac34&\frac13\\ \frac14&\frac23 \end{bmatrix} \begin{bmatrix}20\\6\end{bmatrix} = \begin{bmatrix} \frac34(20)+\frac13(6)\\ \frac14(20)+\frac23(6) \end{bmatrix} = \begin{bmatrix}15+2\\5+4\end{bmatrix} = \begin{bmatrix}17\\9\end{bmatrix}. $$

Check: The two locations initially hold \(20+6=26\) units and afterward hold \(17+9=26\) units. The component rules also give the calculated values directly: \(15+2=17\) in warehouse 1 and \(5+4=9\) in warehouse 2.

Columns Describe the Source Variables

For a state vector of counts or quantities, column \(j\) describes the contributions made by the \(j\)th current-state component to the next state. This perspective is especially useful for age-structured populations. Each column can be read as the next-period contributions associated with one current age class.

Worked Example: A Two-Class Population

Suppose the state records juveniles and adults, in that order. In each period, every adult produces two juveniles; every juvenile survives and becomes an adult; and every adult survives as an adult. There are no other changes. Let \(\mathbf{x}_t=(J_t,A_t)^{\top}\), where \(J_t\) and \(A_t\) denote the two class counts.

The juvenile count next period comes from current adults, while the adult count comes from both current juveniles and current adults. Thus

$$ J_{t+1}=2A_t, \qquad A_{t+1}=J_t+A_t, \qquad \mathbf{x}_{t+1} = \begin{bmatrix}0&2\\1&1\end{bmatrix}\mathbf{x}_t. $$

The first column \((0,1)^{\top}\) records the next-state contribution from one current juvenile. The second column \((2,1)^{\top}\) records the contribution from one current adult. If \(\mathbf{x}_t=(3,4)^{\top}\), then

$$ \begin{bmatrix}0&2\\1&1\end{bmatrix} \begin{bmatrix}3\\4\end{bmatrix} = \begin{bmatrix}0(3)+2(4)\\1(3)+1(4)\end{bmatrix} = \begin{bmatrix}8\\7\end{bmatrix}. $$

Check: Four adults produce \(2(4)=8\) juveniles. The three current juveniles and four surviving adults give \(3+4=7\) adults. These match the two components of the matrix product.

The model is a simplified rule, not a claim that every real population has these rates. In a model with fractional rates, the state components may represent expected counts or aggregate quantities rather than literal whole-number counts. The matrix still records the assumed linear update.

Choose State Variables That Determine the Next Step

A state vector must contain enough information to determine the next state under the proposed rules. If a future update depends on a quantity that the state omits, then the listed variables do not form a sufficient state for that rule. For example, current stock alone may not determine next period's stock when some replenishment is already in transit. Include the order pipeline as another component.

Worked Example: Inventory with Orders in Transit

Let \(I_t\) be on-hand inventory and \(O_t\) be outstanding orders due to arrive during the next period. Suppose one half of the current inventory remains after sales, all outstanding orders arrive, and a new order equal to one quarter of current inventory is placed. Take the state to be \(\mathbf{x}_t=(I_t,O_t)^{\top}\).

The next on-hand inventory is \(\frac12 I_t+O_t\), while the next outstanding order amount is \(\frac14 I_t\). Consequently,

$$ \mathbf{x}_{t+1} = \begin{bmatrix} \frac12&1\\ \frac14&0 \end{bmatrix}\mathbf{x}_t. $$

If \(I_t=8\) and \(O_t=4\), then

$$ \begin{bmatrix} \frac12&1\\ \frac14&0 \end{bmatrix} \begin{bmatrix}8\\4\end{bmatrix} = \begin{bmatrix} \frac12(8)+1(4)\\ \frac14(8)+0(4) \end{bmatrix} = \begin{bmatrix}4+4\\2+0\end{bmatrix} = \begin{bmatrix}8\\2\end{bmatrix}. $$

Check: Half of the current eight units is four, and the four units in transit arrive, giving eight units on hand. The new order is one quarter of eight, or two units. Thus the component rules agree with the matrix product. On-hand inventory by itself would not determine the next on-hand amount: with \(I_t=8\), an outstanding order of one would instead give \(\frac12(8)+1=5\). The order amount must therefore be included in the state.

A Useful Check: Conserved Totals

In the warehouse-transfer model, total stock is preserved. This can be checked directly from the matrix: each column sums to \(1\). The following result explains why that check works for any state, not only the example's particular numbers.

Proposition: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\). If the entries in each column of \(\mathbf{A}\) sum to \(1\), then every update \(\mathbf{x}_{t+1}=\mathbf{A}\mathbf{x}_t\) preserves the sum of the state components: \(\sum_{i=1}^{n}x_{i,t+1}=\sum_{j=1}^{n}x_{j,t}\).

Proof. The \(i\)th next-state component is \(x_{i,t+1}=\sum_{j=1}^n a_{ij}x_{j,t}\). Summing over \(i\) and collecting the terms multiplying each current component gives \(\sum_{i=1}^n x_{i,t+1}=\sum_{i=1}^n\sum_{j=1}^n a_{ij}x_{j,t}=\sum_{j=1}^n(\sum_{i=1}^n a_{ij})x_{j,t}\). By the hypothesis, every inner column sum \(\sum_{i=1}^n a_{ij}\) equals \(1\), so the final expression is \(\sum_{j=1}^n x_{j,t}\), as claimed. \(\square\)

For the inventory-transfer matrix, the column sums are \(\frac34+\frac14=1\) and \(\frac13+\frac23=1\). The proposition therefore guarantees conservation for any starting inventory vector. The population matrix does not have this property: its column sums are \(1\) and \(3\), reflecting the model's production of new juveniles.

Common Pitfalls and External Inputs

Using the transpose by mistake. Because state vectors are columns, the update is \(\mathbf{A}\mathbf{x}_t\), not \(\mathbf{A}^{\top}\mathbf{x}_t\). For the warehouse model, the incorrect transpose calculation for \((20,6)^{\top}\) would be

$$ \begin{bmatrix} \frac34&\frac14\\ \frac13&\frac23 \end{bmatrix} \begin{bmatrix}20\\6\end{bmatrix} = \begin{bmatrix}\frac{33}{2}\\\frac{32}{3}\end{bmatrix}, $$

which does not give the stated warehouse rules or preserve the total stock. The correct product uses the original matrix and gives \((17,9)^{\top}\). Check the meaning of each row against the update rule before multiplying.

A constant external input is not part of a homogeneous linear update. For instance, a one-variable rule \(I_{t+1}=I_t-d\), with fixed \(d\ne0\), cannot be written as \(I_{t+1}=aI_t\) for all \(I_t\): at \(I_t=0\), the first rule gives \(-d\), while every linear rule \(aI_t\) gives \(0\). One way to represent a constant term is to add a fixed coordinate. With \(\mathbf{z}_t=(I_t,1)^{\top}\), the same update becomes

$$ \begin{bmatrix}I_{t+1}\\1\end{bmatrix} = \begin{bmatrix}1&-d\\0&1\end{bmatrix} \begin{bmatrix}I_t\\1\end{bmatrix}. $$

The added coordinate carries the constant input through the matrix product. Before using a recurrence, check whether all next-state terms are proportional to the current state variables or whether a fixed input must also be represented.

Check Your Understanding

For each question, identify the state variables and match every matrix row to a component update rule.

  1. A two-location system has state \((x_{1,t},x_{2,t})^{\top}\). Each period, one fifth of location 1 moves to location 2, and one half of location 2 moves to location 1. Write the update matrix.
  2. In an age-structured model, the state is \((J_t,A_t)^{\top}\). Each adult produces three juveniles, each juvenile becomes an adult, and adults do not survive. Write the recurrence and interpret its columns.
  3. For the matrix in question 1, do the column sums show that total stock is preserved? Justify your answer.
  4. Why can current on-hand inventory fail to determine next period's inventory when orders are in transit?
  5. Explain why a fixed nonzero demand term cannot be represented by multiplication of the inventory alone by a scalar.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon