Lecture 4 - Matrices
Lecture 4 - Matrices
LECTURE 4
MATRICES
INTRODUCTION
𝑥 − 2𝑦 = 1 (1)
−2𝑥 + 3𝑦 = −2 (2)
We can do this easily using substitution: use equation (1) to write 𝑥 = 1 + 2𝑦, and
then substitute this expression into equation (2) to get
−2(1 + 2𝑦) + 3𝑦 = −2 ,
This works fine for this small system of two equations. What about something
larger, say
We could again use substitution, but the problem is quite a bit harder (and
messier) this time — try it! The situation gets worse the more equations we have. We
would like a more systematic and organized approach to solving such problems, and
fortunately, there is one. The system (3) can be expressed in the form
Matrices are denoted using bold uppercase letters. For example, let
Here A is a matrix of 3 rows and 3 columns, and we say A has size 3 × 3. The
size of a matrix is always stated as rows × columns, that is, rows first, columns second.
The entries or elements of A are the numbers. These are denoted by their
position:
For example, in our matrix A, a31 = 5 since the entry in row 3 and column 1 is 5.
Notice again, when referring to position of entries: rows first, columns second. Similarly,
a23 = 1 is the entry in row 2 column 3. Also notice how we have used the lowercase
letter “a” in aij to correspond with our choice of uppercase “A” used to represent the
matrix. If instead we used B to represent our matrix, we would use bij to refer to the
individual entries.
Now that we have some notation, let’s state the formal definition of a matrix:
is called an m × n matrix or matrix of size m × n. For entry aij, i is the row subscript, while
j is the column subscript.
Example: Let
Example: Let P = [3 -4 π]
P is called a row matrix or row vector. Here p11 = 3, p12 = −4 and p13 = π.
Example: Let
Q is called a column matrix or column vector. Here q11 = 0, p21 = 2 and p31 = e.
TRANSPOSE OF A MATRIX
Then
Example: Let
Then
Zero Matrix. The m × n zero matrix is the m × n matrix with all entries zero. For
example, the 2 × 3 zero matrix is
Square Matrix. A matrix with the same number n of rows and columns is called a
square matrix of order n. For example,
Here the entries a11 = 1, a22 = 3, and a33 = −3 (reading from upper-left to lower-
right) form the main diagonal of A.
Diagonal Matrix. A square matrix [aij]n×n with all entries not on the main diagonal equal
to zero is called a diagonal matrix. That is, aij = 0 if i ≠ j. For example
is not.
Upper Triangular Matrix. A square matrix is called upper triangular if all entries below
the main diagonal are zero, for example
Lower Triangular Matrix. A square matrix is called lower triangular if all entries
above the main diagonal are zero, for example
Matrices inherit many of the properties of ordinary real numbers, including some of the
operations of arithmetic. Here we define two of these operations: addition of matrices,
and the multiplication of a matrix by a number, called scalar multiplication.
MATRIX ADDITION
A + B = [aij + bij]m×n
That is, provided A and B are the same size, the matrix C = A + B is simply the m × n
matrix formed by adding the corresponding entries of A and B: c ij = aij + bij .
Example: Let
Then
Example: Let
This last example generalizes: matrices inherit the addition properties of the real
numbers: for matrices A, B, C and 0m×n each of size m × n:
1. A + B = B + A.
2. A + (B + C) = (A + B) + C.
3. A + 0m×n = A.
4. (A + B)T = AT + BT.
SCALAR MULTIPLICATION
Let A = [aij]m×n be a matrix and let k be a real number (a scalar). Then C = kA is the
matrix with entry cij = kaij. For example, for
Example: Let
Then
Like matrix addition, scalar multiplication inherits many of the multiplication rules
of the ordinary real numbers. In the following, let k, k 1 and k 2 be scalars, and A and B
be matrices of size m × n:
1. k(A + B) = kA + kB.
2. (k 1 + k 2 )A = k 1A + k 2A.
3. k 1(k 2A) = (k 1k 2 )A.
4. 0A = 0m×n.
5. k0m×n = 0m×n.
6. (kA)T = kAT .
MATRIX SUBTRACTION
Now that we have clearly defined matrix addition and scalar multiplication, the
operation of subtraction can be stated simply: if A and B are matrices of size m × n,
then we define
A − B = A + (−1) B
Solution:
Therefore
Solution:
First, notice that A, B and C are all the same size, 2 × 3 in this case, so addition is
defined. So
1. Given:
Find:
a. 2A + 3(B + C) c. (B − 2AT)T
1
b. ( ) A − 2(B + 2C) d. −3(B − 2 02×2) + 0 B
2