Marginal

Linear Algebra & Dynamics

The linear algebra behind modern economics: independence and rank, eigenvalues and eigenvectors, matrix powers, definiteness of quadratic forms, Markov chains, input–output analysis, systems of difference and differential equations, saddle paths, and linear programming with duality.

20 lessons in 4 units

Start your free trial14 days free. No card needed.
What you'll learn

20 lessons, one small step at a time

Each lesson states its goal, then works up to it in short steps with practice after each. A placement test at the start skips what you already know.

Vectors & Eigenvalues

8 lessons
  1. Dot productsCompute dot products, use them for the lengths of vectors and the angles between them, and test vectors for orthogonality.
  2. Linear independenceTest vectors for linear independence, find when they become dependent, and describe their span, a basis and the dimension.
  3. Rank & solvabilityFind the rank of a matrix and when a system is singular, and count the solutions of a linear system.
  4. EigenvaluesFind the eigenvalues of a 2×2 matrix from its trace and determinant and from its characteristic equation.
  5. EigenvectorsCheck whether a vector is an eigenvector and find its eigenvalue, and find an eigenvector for a known eigenvalue.
  6. Matrix powersCompute matrix powers along an eigenvector and for combinations of eigenvectors, and use the dominant eigenvalue to find long-run growth, as in population projection.
  7. Quadratic formsEvaluate a quadratic form xᵀAx, and move between a quadratic form and its symmetric matrix.
  8. Definiteness of quadratic formsClassify a symmetric matrix as definite, semidefinite or indefinite with the determinant test and with the eigenvalue test, and relate definiteness to second-order conditions.

Economic Applications

3 lessons
  1. Transition dynamicsCompute next period's distribution in a Markov chain from its transition probabilities, and the distribution several periods ahead.
  2. Stationary distributionsCompute the stationary distribution of a two-state chain, infer flows from it, and link it to the eigenvalue one.
  3. Input–output analysisCompute intermediate demand in an input–output model, find gross outputs with the Leontief inverse, and interpret output multipliers.

Dynamic Systems

6 lessons
  1. Iterating linear systemsRun a linear dynamic system one step and several steps forward, directly and along an eigenvector.
  2. Systems of difference equationsClassify a linear difference system as stable, unstable or a saddle from its eigenvalues, recognize oscillation and the Blanchard–Kahn condition, and find its steady state.
  3. Complex eigenvalues & cyclesCompute the modulus and rotation of complex eigenvalues, apply them to Samuelson's multiplier–accelerator model, and find the length of its cycles.
  4. Stability of ẋ = AxClassify the rest point of ẋ = A·x from its trace and determinant, solve the system along eigenvectors, and contrast stability in continuous and discrete time.
  5. Spirals & nodesTell spirals from nodes with the discriminant, place saddles and centers in the trace–determinant plane, and find how fast a spiral turns and shrinks.
  6. Saddle pathsFind the slope of the stable arm at a saddle from the stable eigenvector, and explain how jump variables put the economy on it.

Linear Programming

3 lessons
  1. Corners of a feasible setFind the corners of a feasible set where two constraints bind and where constraints meet the axes, and check whether a point is feasible.
  2. Linear programmingFormulate a linear program, evaluate its objective at the corners of the feasible set, solve it, and describe how large programs are solved.
  3. LP duality & shadow pricesCompute shadow prices from the dual of a linear program, interpret them, and apply weak and strong duality.
Sample lesson

Dot products

Goal: Compute dot products, use them for the lengths of vectors and the angles between them, and test vectors for orthogonality.

Linear algebra is the language of models with many variables: many goods, many assets, many regressors. Its basic operation, the dot product, is already familiar in disguise: total spending is prices times quantities, summed over goods.

We will compute dot products, measure lengths and angles, and finish with orthogonality.

Step 1: Computing dot products

A vector in ℝⁿ is a list of n numbers, such as the quantities of n goods. Vectors add and scale component by component, and the dot product combines two vectors into a single number:

x·y = x₁y₁ + x₂y₂ + … + xₙyₙ

With prices p = (2, 5, 1) and quantities q = (3, 1, 4), total spending is p·q = 6 + 5 + 4 = 15. A portfolio's return is the dot product w·r of its weights and the asset returns. The dot product of a vector with itself, x·x, is the sum of its squared components: the squared length of x.

Step 2: Length and angle

The length of a vector is the square root of its dot product with itself, and the dot product of two vectors measures the angle θ between them:

|x| = √(x·x)
x·y = |x|·|y|·cos θ

So (3, 4) has length 5, and (3, 4)·(4, 3) = 24 = 5 × 5 × cos θ gives cos θ = 0.96, a small angle: the vectors point almost the same way. The sign of x·y says whether the angle is acute (positive), a right angle (zero) or obtuse (negative). Since cos θ lies between −1 and 1, |x·y| ≤ |x|·|y|, the Cauchy–Schwarz inequality. Statistics uses exactly this to measure how closely two variables move together: list each variable's deviations from its mean as a vector, and the cosine of the angle between the two vectors is that measure, so it always lies between −1 and 1.

Step 3: Orthogonality

Two vectors are orthogonal (perpendicular) when their dot product is zero:

x and y are orthogonal exactly when x·y = 0

(1, 2) and (2, −1) are orthogonal, since 2 − 2 = 0, while (1, 2) and (2, 1) are not. To make (3, k) orthogonal to (2, 6), solve 6 + 6k = 0, so k = −1. Orthogonality appears throughout economics: in regression, the residuals are orthogonal to every regressor, and a price vector is orthogonal to every bundle of trades that costs nothing.

In the app, each step ends with practice questions, new ones every time, and the lesson comes back later in spaced reviews.

Start Linear Algebra & Dynamics

Lessons that need something you haven't learned yet bring it in first, from any course.

Start your free trial14 days free. No card needed.