Week 4 – Matrix Algebra for Economics

Learning Outcomes By the end of this week, students will be able to:

  1. Create and manipulate matrices in MATLAB.
  2. Understand the difference between element-wise and matrix operations.
  3. Solve systems of linear equations relevant to economics.
  4. Compute matrix inverses, determinants, and eigenvalues.
  5. Apply matrix algebra to a simple macroeconomic model (e.g., IS–LM).

Suggested Readings

In-Class Activities

  • Construct small matrices and perform:
    • Addition, subtraction, scalar multiplication.
    • Element-wise multiplication (.*) vs. matrix multiplication (*).
  • Solve a 2×2 linear system representing goods and money market equilibrium using:
    • The backslash operator (A\b).
    • inv() (and discuss why it’s less efficient).
  • Compute determinants and eigenvalues of a transition matrix.
  • Demonstrate stability analysis in a 2-equation dynamic system using eigenvalues.

Homework / Practice

  • Write a script that:
    • Defines an IS–LM model as a system of equations.
    • Represents it in matrix form.
    • Solves for equilibrium output and interest rate.
  • Extend the script to:
    • Change a parameter (e.g., government spending) and re-solve.
    • Plot how equilibrium values change with the parameter.
    • Compute the Cholesky decomposition of a given covariance matrix to simulate correlated shocks to the IS and LM equations and analyze their impact on equilibrium outcomes.

Files

Homework submission

  • Submit your homework here
  • Please upload your homework as a single zip file. Access it’s now open with any email address! But remember to name your file with your full name and or student ID.
  • The submission should include the .m file used to produce the results.
  • You can modify you submission until the beginning of week 5.