An ordinary number in R or C may be called a scalar. An m×n matrix A is a rectangular m-by-n array of numbers called elements or entries. The numbers m and n are called the row dimension and the column dimension, respectively; collectively they describe the size or shape of A. We say A belongs to the set Rm×n if its entries are real, or Cm×n if they are complex-valued. A square matrix has equal row and column dimensions. A row vector has dimension 1×n, while a column vector has dimension m×1.
In this text, all vectors are column vectors, and we use Rn or Cn to denote spaces of these vectors. When a row vector is needed, it is given an explicit transpose symbol (see below).
We use capital letters in bold to refer to matrices, and lowercase bold letters for vectors. The bold symbol 0 may refer to a vector of all zeros or to a zero matrix, depending on context; we use 0 as the scalar zero only.
To refer to a specific element of a matrix, we use the uppercase name of the matrix without boldface. For instance, A24 refers to the (2,4) element of A. To refer to an element of a vector, we use just one subscript, as in x3. A boldface character with one or more subscripts, on the other hand, is a matrix (uppercase) or vector (lowercase) that belongs to a numbered collection.
We will have frequent need to refer to the individual columns of a matrix as vectors. We use a lowercase bold version of the matrix name with a subscript to represent the column number. For example, a1,a2,…,an are the columns of the m×n matrix A. Conversely, whenever we define a sequence of vectors v1,…,vp, we can implicitly consider them to be columns of a matrix V. Sometimes we might write
to emphasize the connection between a matrix and its columns.
The diagonal (more specifically, main diagonal) of an n×n matrix A refers to the entries Aii, i=1,…,n. The entries Aij where j−i=k are on a superdiagonal if k>0 and a subdiagonal if k<0. The diagonals are numbered as indicated here:
A diagonal matrix is one whose entries are all zero off the main diagonal. An upper triangular matrixU has entries Uij with Uij=0 if i>j, and a lower triangular matrixL has Lij=0 if i<j.
The transpose of A∈Cm×n is the matrix AT∈Cn×m given by
The adjoint or hermitian of a matrix A is given by A∗=AT, where the bar denotes taking a complex conjugate elementwise.[1] If A is real, then A∗=AT. A square matrix is symmetric if AT=A and hermitian if A∗=A.
Matrices and vectors of the same size may be added elementwise. Multiplication by a scalar is also defined elementwise. These operations obey the familiar laws of commutativity, associativity, and distributivity. The multiplication of two matrices, on the other hand, is less straightforward.
There are two ways for vectors to be multiplied together. If v and w are in Cn, their inner product is
For real vectors, the complex conjugates above have no effect and ∗ becomes T.
In order for matrices A and B to be multiplied, it is necessary that their inner dimensions match. Thus, if A is m×p, then B must be p×n. In terms of scalar components, the (i,j) entry of C=AB is given by
Hence while we cannot change the ordering of the terms, we can change the order of the operations. This is a property that we will use repeatedly. We also note here the important identity
It is worth reinterpreting (6) at a vector level. If A has dimensions m×n, it can be multiplied on the right by an n×1 column vector v to produce an m×1 column vector Av, which satisfies
We say that Av is a linear combination of the columns of A.
There is a similar interpretation of multiplying A on the left by a row vector. Keeping to our convention that boldface letters represent column vectors, we write, for v∈Rm,
The identity matrix of size n, called I (or sometimes In), is a diagonal n×n matrix with every diagonal entry equal to one. As can be seen from (11) and (12), it satisfies AI=A for A∈Cm×n and IB=B for B∈Cn×p. It is therefore the matrix analog of the number 1, the multiplicative identity.
Note that a square matrix A can always be multiplied by itself to get a matrix of the same size. Hence we can define the integer powers A2=(A)(A), A3=(A2)A=(A)A2 (by associativity), and so on. By definition, A0=I.
If A is an n×n matrix, then there may be at most one matrix Z of the same size such that
If Z exists, it is called the inverse of A and is written as A−1. In this situation we say that A is invertible.
The zero matrix has no inverse. For n>1 there are also nonzero matrices that have no inverse. Such matrices are called singular. The properties “invertible” and “singular” are exclusive opposites; thus, nonsingular means invertible and noninvertible means singular.
✍ In racquetball, the winner of a rally serves the next rally. Generally, the server has an advantage. Suppose that when Ashley and Barbara are playing racquetball, Ashley wins 60% of the rallies she serves and Barbara wins 70% of the rallies she serves. If x∈R2 is such that x1 is the probability that Ashley serves first and x2=1−x1 is the probability that Barbara serves first, define a matrix A such that Ax is a vector of the probabilities that Ashley and Barbara each serve the second rally. What is the meaning of A10x?
✍ Suppose we have lists of n terms and m documents. We can define an m×n matrix A such that Aij=1 if term j appears in document i, and Aij=0 otherwise. Now suppose that the term list is
and that x=[11010]T. Give an interpretation of the product Ax.
only - Unknown Directive
Entry $i$ of $A\mathbf{x}$ is the sum of $a_{ij}x_j$, so the result is the number of the terms 'numerical', 'analysis', and 'cool' that appear in document $i$. (Note: this is not the same as the total number of occurrences of the words; each term is counted only once.)
The conjugate of a complex number is found by replacing all references to the imaginary unit i by −i. We do not use complex numbers until the second half of the book.