Pulsars
0 %
Log inSign up

Notation and basic operations

What is a matrix

An organised array of numbers

A matrix is a rectangular array of numbers, arranged in rows and columns. A matrix with n rows and p columns is said to have size (dimension) n x p (n rows, p columns). Each number in the array is called a coefficient (or entry).

Notation

A matrix is usually written with a capital letter, and its coefficients with the same letter in lowercase and two indices: a(i,j) denotes the coefficient located at row i and column j.

Matrix A of size 2 x 3 (2 rows, 3 columns):

       column1  column2  column3
row1   [ a11      a12      a13  ]
row2   [ a21      a22      a23  ]

Numerical example:

       [ 1   2   3 ]
  A =  [ 4   5   6 ]

(here a12 = 2, it is the value at row 1, column 2)
(here a23 = 6, it is the value at row 2, column 3)

Special cases

  • A square matrix has as many rows as columns (size n x n).
  • A column matrix has only one column (size n x 1): it often represents a point or a vector.
  • A row matrix has only one row (size 1 x p).

What it is used for

A matrix lets you store and manipulate, all at once, a set of related values: the coefficients of a system of equations, the coordinates of several points, a geometric transformation (rotation, scaling)... It is a tool that advantageously replaces a list of isolated numbers as soon as you want to do structured calculations.

Common pitfall

Do not confuse the size n x p (n rows, p columns) with the reverse order: a 2 x 3 matrix does not have the same shape as a 3 x 2 matrix, even if they contain the same number of coefficients (6 in both cases). The rows-columns order is always respected in the notation.