Review of Matrices: 1.1 Definitions
Review of Matrices: 1.1 Definitions
Review of Matrices
1.1 Definitions
A matrix is a rectangular array of numbers of the form
a11 a12 a13 · · · a1n
a21 a22 a23 · · · a2n
· · · a3n
a31 a32 a33
.. .. .. .. ..
. . . . .
am1 am2 am3 · · · amn
• We usually use capital letters (for example, A, B, C, . . .) for the names of matrices,
and we usually use lowercase letters (for example, a, b, c, . . .) to represent the numbers
inside of a matrix.
• The numbers inside a matrix are called the elements or entries of the matrix.
• The sequence of all entries on a horizontal line is called a row, and the sequence of all
entries on a vertical line is called a column. We number the rows from top to bottom,
and the columns from left to right.
• The entry in the kth row and lth column of a matrix A is denoted by akl .
The entry in the 2nd row and 4th column of A is 3, and so we write a24 = 3.
1
1
2
(b) B = is a 4 × 1 matrix.
3
4
It can also be referred to as a column matrix or a column vector.
[ ]
(c) C = 1 2 −3 4 −1 is a 1 × 5 matrix.
Further Definitions:
• If a matrix has order n×n (that is, if the number of rows equals the number of columns)
then the matrix is called square.
• The main diagonal of a square matrix consists of the entries on the diagonal from
the top left corner of the matrix down to the bottom right corner of the matrix.
• A diagonal matrix is a square matrix in which all of the entries which are not on the
main diagonal must equal zero.
– all the entries which lie below the main diagonal are zero, or
– all the entries which lie above the main diagonal are zero.
Example 1.1.2.
1 2
(a) D = is a 2 × 2 square matrix.
3 −4
2 0 0
(b) E =
0 −3 0
is a 3 × 3 square matrix.
0 0 −6
2
1.2 Matrix Operations
Matrix equality. Two matrices are equal if they have the same order and their correspond-
ing entries are equal.
a b e f
= if and only if a = e, b = f, c = g and d = h.
c d g h
Matrix addition. Two matrices can be added if they have the same size. We add two such
matrices by adding the corresponding entries.
a b e f a+e b+f
+ =
c d g h c+g d+h
For example,
1 7
1 3 4 =
5 2 2
+
2 −1 −1 −3 1 −4
Matrix multiplication. The product AB of two matrices A and B is defined if and only
if the number of columns of A is equal to the number of rows of B.
.n columns ··· ··· ··· ···
. .. .. ..
. . . . n ··· ··· ··· ···
rows ··· ··· ··· ···
.. .. .. ..
. . . . ··· ··· ··· ···
A B
To calculate the entry in the (i, j) position (that is, in the ith row and j th column) of
AB, we multiply the ith row of A by the j th column of B.
3
Example 1.2.1.
a b e f ae + bg af + bh
=
c d g h ce + dg cf + dh
Example 1.2.2.
3 2 a b c 3a + 2d 3b + 2e 3c + 2f
=
4 1 d e f 4a + 1d 4b + 1e 4c + 1f
Example 1.2.3.
1 2 −3
2 3
1 × 2 + 2 × 1 + −3 × 4 1 × 3 + 2 × 6 + −3 × 5
1 6 =
4 5 6 4×2+5×1+6×4 4×3+5×6+6×5
4 5
−8 0
=
37 72
Transpose. The transpose AT of a matrix A is obtained by putting the ith row of A into
the ith column of AT . If A has order m × n then AT has order n × m.
2 9
2 4 1
Example 1.2.4. If A = T
then A = 4 9
9 9 6
1 6
4
1.3 Properties of Matrix Operations
1.3.1 Addition Properties
A+B = B+A
A + (B + C) = (A + B) + C
A+O = A = O+A
A + −A = O = −A + A
The matrix O is called the zero matrix, and −A is called the negative of A.
In the above properties, A, B, C, O and −A all have the same order. Thus, for example,
a b 0 0 −a −b
(a) if A = then O = and −A =
c d 0 0 −c −d
a b 0 0 −a −b
(b) if A = c d then O = 0 0 and −A = −c −d
e f 0 0 −e −f
A(B + C) = AB + AC
(B + C)A = BA + CA
A(BC) = (AB)C
However, usually AB ̸= BA
where I is a diagonal matrix with ones on the main diagonal and zeros elsewhere.
The matrix I is called the identity matrix, and must have the same order as A.
5
For example:
1 0
If A is 2 × 2 then I =
0 1
1 0 0
If A is 3 × 3 then I =
0 1 0
0 0 1
Note: It is important to realize that, if we choose any two matrices A and B, then usually
AB ̸= BA
3 6 −10 −4
Example 1.3.1. Let A = and B =
−4 −8 5 2
Then
3 6 −10 −4 −30 + 30 −12 + 12 0 0
AB = = =
−4 −8 5 2 40 − 40 16 − 16 0 0
and
−10 −4 3 6 −30 + 16 −60 + 32 −14 −28
BA = = =
5 2 −4 −8 15 − 8 30 − 16 −7 14
In this example,
AB ̸= BA
6
1.3.3 Exercises
1. Find
2 −2 0 3 4 2 3 43
(a) + (b) +
7 4 −1 0.6 − 2
3
−1 −4 3
2. Find
2 − 12 3 14 5 8
(a) −2 (b) 4 (c) 3
3 0 −1 0 6 −4
3. Find
3 −2 0 3 2 −1 2 4
(a) (b) 1
7 4 −1 4 2
4 3 −3
4. Given that
3 1 4 2 7 1 18 55 19
1 5 x 8 2 8 = 51 89 59 ,
2 6 5 1 8 2 57 66 60
find x.
7
1.4 The Determinant and Inverse of a 2 × 2 Matrix.
The matrix B is the inverse of A if AB = I = BA .
Not all matrices have inverses. When a matrix A does have an inverse B, then the inverse
is unique (i.e., it has no other inverses), and we write A−1 instead of B. Thus
AA−1 = I = A−1 A
a b
For A = , we define the determinant of A by
c d
det(A) = ad − bc
a b
We sometimes write instead of det(A) .
c d
Note: If det(A) = 0 then A−1 does not exist, and we say that A is singular.
2 3
Example 1.4.1. Find the determinant and the inverse of the matrix A = .
4 0
Solution.
2 3
We have det(A) = = 2 × 0 − 3 × 4 = −12
4 0
and
−1
2 3 1 0 −3 0 1
A−1 = = = 1 4
4 0 −12 −4 2 3
− 61
8
1.4.1 Exercises
1. Evaluate
1 0 1 1 3 1
(a)
(b)
(c)
0 2 1 1 2 1
We cannot divide by A. Instead, we multiply both sides of the equation by A−1 (if A−1
exists). In particular, if A−1 exists then we can solve the above equation for the matrix X,
as follows:
AX = C ⇒ A−1 AX = A−1 C (multiplying both sides of the equation on the left by A−1 )
⇒ IX = A−1 C
⇒ X = A−1 C .
Similarly,
XA = C ⇒ XAA−1 = CA−1 (multiplying both sides of the equation on the right by A−1 )
⇒ X = CA−1 .
Note that
9
Example 1.5.1. Find the matrix X such that
2 3 9 0
X = .
4 0 1 1
Solution.
−1
2 3 2 3
Since is on the right of X, we multiply on the right by .
4 0 4 0
Now
2 3 9 0
X =
4 0 1 1
−1 −1
2 3 2 3 9 0 2 3
⇒X =
4 0 4 0 1 1 4 0
9 0 1 0 −3
⇒ XI =
1 1 −12 −4 2
1 9 0 0 −3
⇒X =
−12 1 1 −4 2
1 0 −27
=
−12 −4 −1
9
0
= 1 1
4
3 12
10
1.5.2 Exercises
1. Find the matrix X such that
−1 2 9 2 2 2 8 6
(a) X = (b) X =
−3 1 −7 4 2 −5 −13 −1
1 0 2 1 0 1 1 2
(c) X = (d) X =
3 2 1 0 −1 0 0 0
2 2 8 6 2 2 3
(c) Y = (d) Y =
2 −5 −13 −1 2 −5 1
represents two lines in the x, y-plane. When we solve these equations simultaneously, we are
finding the point of intersection of the two lines. We can write the above system of equations
in matrix form as follows:
a b
x =
p .
c d y q
11
Example 1.6.1. Solve the following system of equations:
2x + 3y = 8
x − 4y = −7
Solution.
We need to find x and y such that both of the above equations are satisfied.
To do this, we write the above system in matrix form:
2 3 x 8
= .
1 −4 y −7
2 3
Then we premultiply the matrix equation by the inverse of to get
1 −4
−1
x 2 3 8
=
y 1 −4 −7
1 −4 −3 8
=
−11 −1 2 −7
1 −11
=
−11 −22
1
= .
2
Thus x = 1 and y = 2.
12
1.6.1 To Solve a System of Equations:
ax + by = p
cx + dy = q
in matrix form:
a b x p
= .
c d y q
13
Example 1.6.2. Solve the following system of equations:
2x + 3y = 6
4x + 6y = −12
Solution.
Graphically, the lines 2x+3y = 6 and 4x+6y = −12 are non-intersecting parallel
lines:
ppppppp y
ppppppp 6
ppppppp
ppppppp
ppppppp
ppppppp
ppppppp
ppppppp
ppppppp
sppp
2 ppppppppppppppp
ppppppp
ppppppp 2x + 3y = 6
ppppppp
ppppppp ppppppp
ppppppp ppppppp
ppppppp ppppppp
sppppppp pppspppp -
ppppppp ppppp x
−3 ppppppppppp 3 ppppppppppp
ppppppp
ppppppp
ppppppp
ppppppp
ppppppp
pppsppp
−2 ppppppppppppppp
ppppppp
ppppppp 4x + 6y = −12
ppppppp
ppppppp
ppppppp
ppppppp
pp
14
Example 1.6.3. Consider the following simultaneous system of linear equations, where k
is a constant:
kx + 3y = 4
3x + ky = 5 .
AX = B .
Solution.
k 3 x 4
= .
3 k y 5
Solution.
k 3 k 3
A= and so det(A) = = k2 − 9 .
3 k 3 k
(c) Find the value(s) of k for which the system has a unique solution.
Solution.
det(A) ̸= 0
⇔ k 2 − 9 ̸= 0
⇔ (k − 3)(k + 3) ̸= 0
⇔ k ̸= 3 and k ̸= −3
⇔ k ∈ R \ {3, −3} .
15
1.6.2 Exercises
1. Solve the following systems of equations:
(a) 2x + 3y = 8 (b) 2x − y = −5
x + 4y = 9 x + 3y = 1
(c) 2x + 3y = 6 (d) 2x + 3y = 6
4x + 6y = 3 4x + 6y = 12
3x + py = 9
(p + 1)x + 2y = 9 .
(a) Show that the system has a unique solution if and only if p ∈ R \ {−3, 2}.
(b) Find the value(s) of p for which the system has infinitely many solutions.
(c) Find the value(s) of p for which the system has no solution.
Hint for (b) and (c): Consider the cases p = −3 and p = 2 separately, i.e., substitute
p = −3 into the system and then try to solve the system; do the same for p = 2 .
16
Chapter 15
Answers
4. x = 9
[ ] [ ] [ ] [ ]
3 −4 26
7
2
7
1
2
1
2 2 −1
1.5.2: 1. (a) (b) −67 −12
(c) (d)
1 2 14 7 1 0 0 0
[ ] [ ] [ ] [ ]
23 −6
5 5 1 1 2 1 17
2. (a) 34 2
(b) (c) (d) 14
5 5 1 3 1 4
[ ] [ ]
38 −15 3 − 32
3. (a) 1
4 (b) − 14
−42 17 −22 3
159