Skip to main content

Laws of matrix algebra

Author
Affiliation

Department of Economics, University of Houston

Published

November 30, 2026

Part of Math Camp: An Introduction to Mathematics and Statistics with Applications in Economics.
Main Stam4Econ site | View this section in the book | Author: Fan Wang | DOI: 10.5281/zenodo.24696926
Date: 2026-11-30 | HTML | PDF | QMD

1 Laws of matrix algebra

1.1 From scalar algebra to matrix algebra

In scalar algebra, we have the associative, distributive, and commutative rules for addition and for multiplication.

Specifically, for any scalars \(a\), \(b\), and \(c\), we learned in elementary school that:

  1. Associative rule for addition:\((a + b) + c = a + (b + c)\)
  2. Associative rule for multiplication:\((a \times b) \times c = a \times (b \times c)\)
  3. Commutative rule for addition:\(a + b = b + a\)
  4. Commutative rule for multiplication:\(a \times b = b \times a\)
  5. Distributive rule:\(a \times (b + c) = a \times b + a \times c\) and \((a + b) \times c = a \times c + b \times c\)

In matrix algebra, the associative and distributive rules hold, but the commutative rule for multiplication does not hold in general. Specifically, for any matrices \(A\), \(B\), and \(C\):

  1. Associative rule for addition:\((A + B) + C = A + (B + C)\)
  2. Associative rule for multiplication:\((A \times B) \times C = A \times (B \times C)\)
  3. Commutative rule for addition:\(A + B = B + A\)
  4. Commutative rule for multiplication:\(A \times B \neq B \times A\) in general
  5. Distributive rule:\(A \times (B + C) = A \times B + A \times C\) and \((A + B) \times C = A \times C + B \times C\)

So matrix algebra is very similar to scalar algebra, except that matrix multiplication is not commutative in general.

1.2 Transpose

Transposing a matrix means swapping its rows and columns. The transpose of a matrix \(A\) is denoted as \(A^T\). If \(A\) is a 1 by 1 matrix, then its transpose is itself. If \(A\) is a 1 by n matrix (a row vector), then its transpose is an n by 1 matrix (a column vector), and vice versa. If \(A\) is an m by n matrix, then its transpose is an n by m matrix.

The transpose operation has the following core properties:

  1. \((cA)^T = cA^T\) for any scalar \(c\)
  2. \((A^T)^T = A\)
  3. \((A + B)^T = A^T + B^T\)
  4. \((AB)^T = B^T A^T\)

The first and the second properties are straightforward. The first says that transposing a scaled matrix is the same as scaling the transposed matrix. The second says that transposing a matrix twice returns the original matrix.

The third property looks confusing because the \(^T\) transpose notation looks like an exponent. But it is not an exponent, it is just a notation for the transpose operation. The third property says that the transpose of a sum of matrices is the same as the sum of the transposed matrices. So while we can not distribute exponents over addition, we can distribute the transpose operation over addition.

The fourth perhaps is a commonly used operation, the transpose can be distributed over matrix multiplication, but the order of the matrices is reversed. This is because when we transpose a matrix, we swap its rows and columns. So when we transpose a product of matrices, we need to reverse the order of the matrices to maintain the correct dimensions for multiplication. Suppose A is a m by n matrix, and B is a n by p matrix, then AB is a m by p matrix. The transpose of AB is a p by m matrix. On the other hand, the transpose of B is a p by n matrix, and the transpose of A is a n by m matrix. The product of the transposes is a p by m matrix, which is the same as the transpose of AB.