Source

Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree

A matrix is a rectangular array of numbers. An matrix (" by ") has rows and columns. The entry in row , column is (also written ), and we write . Square matrices can often be undone with an inverse.

Special Matrices

NameDescription
Row matrixonly one row ()
Column matrixonly one column ()
Zero matrix every entry is
Square matrix, entries form the main diagonal
Identity square, on the main diagonal and elsewhere
Diagonalsquare, all off-diagonal entries are
Upper triangularsquare, all entries below the diagonal are
Lower triangularsquare, all entries above the diagonal are

Scalars are the plain numbers (real or complex) used alongside matrices.

Equality, Addition, Scalar Multiples

Rules:

  • when they have the same size and for all
  • , only for matrices of the same size

These follow the usual laws: , , , , , , .

Matrix Multiplication

If is and is , then is with

So the entry is the dot product of row of with column of . The inner sizes must match: .

Worked example:

A matrix times a matrix is not defined.

Warnings

Differences from ordinary numbers:

  • in general (not commutative), and one of them may not even be defined
  • does not force or , e.g.

Laws that do hold (when sizes fit):

  • and for of size
  • and
  • and

Transpose

The transpose swaps rows and columns: . An matrix becomes .

Properties:

  • (order reverses)