Matrices. I
Matrices. II
A matrix is a rectangular array of numbers.
Denition:
Matrices A and B are said to be equal if A = [aij ] and B = [bij ] are the same size
and corresponding elements are equals: aij = bij for all (i, j).
This week, we will learn about:
Matrix Algebra
How to compute the inverse of a matrix
◮
◮
Remark: The notation A = [aij ] can be rewritten as
by dening an augmented matrix,
and by computing its reduced row echelon form.
a11
a21
A= .
.
.
an1
Some applications
a12
···
a1m
a22
···
an2
···
a2m
..
.
anm
..
.
when A is of order n × m (i.e. having n rows and m columns). The indexes i, j
are respectively varying from 1 to n, and from 1 to m.
Matrices. III
Matrices. IV
matrix product:
Let C = AB with A a (n × m) matrix and B a (m × p) matrix dened as
Operation on matrices:
Lets consider A = [aij ] and B = [bij ], two matrices of order (n × m)
Addition: we add the corresponding elements
A + B = [aij ] + [bij ] = [aij + bij ]
Multiplication by a scalar α: we multiply each element by the scalar
Then
a1,1
..
.
A=
ai,1
.
..
an,1
···
..
a1,m
..
.
.
..
. ai,m
.
..
. ..
···
an,m
b1,1
bm,1
cij = ai1 · b1j + ai2 · b2j + · · · + aim · bmj =
αA = α[aij ] = [α × aij ]
···
..
.
B=
···
m
X
b1,j
..
.
bm,j
···
···
b1,p
..
.
bm,p
aik · bkj
k=1
and C = [cij ] is a matrix of order (n × p).
Example:
1
0
1
1
4
1
5
6
8
7
9
0
Matrices. V
Matrices. VI
Properties:
Provided that the matrices A, B, C have the apropriate order in each of the
following operations, the properties of the operations on matrices are:
Associativity
Theorem:
If A has an inverse, it is unique.
◮
◮
of the addition (A + B) + C = A + (B + C) = A + B + C
of the multiplication (AB)C = A(BC) = ABC
Distributivity of multiplication over the addition:
Proof: Imagine
◮
◮
of the addition A + B = B + A
but NOT the multiplication: AB 6= BA
13
17
7
9
6
8
5
3
2
we have two inverses B and C of the matrix A then:
BA = AB = I
AC = CA = I
Then multiplying by C the rst equation on the right hand side, and multiplying by B
the second equation by the left hand side:
(A + B)C = AC + BC
Commutativity
9
2
= 5
3
4
(BA)C = (AB)C = (I)C
B(AC) = B(CA) = B(I)
By the property of the product of matrices (associativity) and by the property of the
identity matrix I , we rewrite the system as:
BAC = ABC = C
BAC = BCA = B
⇒
B=C
Matrices. VII
Matrices. VIII
Finding Inverses:
To nd the inverse of the matrix A, we reduce A to the identity matrix I by
elementary row operations, while simultaneously applying the same
operations to I .
1
Create the augmented matrix
..
. I
A
Find the inverse of
2
A= 2
2
and reduce it to its reduced row echelon form.
2
6
6 .
7
6
7
7
Now the matrix is in the form
..
. B
I
and we have B = A−1 .
3
A good verication is to compute BA or AB to check it is equal to the
identity matrix.
Matrices. IX
Matrices. X
First, we construct the desired augmented matrix and convert to row echelon form:
2
2
2
6
6
7
6
7
7
..
.
..
.
..
.
1
0
0
1
0
0
0
0
R1→1/2×R1
−→
R2→R2−2×R1
R3→R3−2×R1
−→
R3→R3−R2
−→
1
0
1
..
.
.
7 6 ..
.
2 7 7 ..
..
1 3 3 .
.
0 1 0 ..
.
0 1 1 ..
..
1 3 3 .
.
0 1 0 ..
..
0 0 1 .
1
2
Second, use elementary row operations to eliminate the non-0s above the leading 1s.
R1
R2
R3
3
3
1/2
0
0
1
0
0
1/2
0
−1
1
−1
0
1/2
0
−1
1
0
−1
Matrices. XI
0
0
R1
R2
R3
0
0
0
3
1
0
0
1
R1→R1−3×R3
−→
R1
R2
R3
R1→R1−3×R2
−→
1
0
R1
R2
R3
0
1
−1
3
0
1
0
0
0
1
1
0
0
0
1
0
0
1
1
0
0
..
. 1/2
..
. −1
..
. 0
1
3
0
R1
R2
R3
0
0
1
..
.
..
.
..
.
..
.
..
.
..
.
1/2
3
−1
1
0
−1
7/2
0
−1
1
0
−1
1
Matrices. XII
Find the inverse of
1
A−1
1
A= 2
1
is the matrix on the r.h.s of dots:
A
−1
7/2
= −1
0
0
1
−1
−3
0 .
1
2
5
0
3
3 .
8
2
Check that AA−1 = I .
where a 6= 0.
1
0
A=
0
0
a
1
0
0
a2
a
1
0
a3
a2
,
a
1
3
1
A= 1
1
3
3
4
3
4 .
3
−3
0
R1
R2
R3
1
−3
0
1
R1
R2
R3
Matrices. XIV
Matrices. XIII
non-invertible matrices:
This method for nding the inverse of an invertible matrix also detects when
a matrix is non-invertible (i.e., when its inverse does not exist).
For
Show that the matrix
A=
has no inverse.
1
2
−1
6
4
2
SOLUTION: Construct the augmented matrix as above, and simplify it using
elementary row operations:
..
6
4
. 1 0 0 R1
1
.
R2
2
4 −1 .. 0 1 0
R3
..
−1 2
5
. 0 0 1
R2→R2−2×R1
R3→R3+R1
4
−1
5
−→
1
0
6
4
−8
−9
0
8
9
1
0
6
4
−8
−9
0
0
R3→R3+R2
−→
0
Matrices. XV
..
. 1
..
. −2
..
. 1
..
. 1
..
. −2
..
. −1
0
1
0
0
1
1
0
0
R1
R2
R3
1
0
0
R1
R2
R3
1
Matrices. XVI
Linear Systems and invertible matrices:
We know that a linear system can be written as a matrix equation:
Ax = b
Since R3 comprises only 0s on the l.h.s. of the dots, we cannot convert the
entries above the zero in row 3, column 3 to a zero by elementary
row operations, and therefore cannot convert the l.h.s. of the matrix to the
non-zero
=⇒
Now if A is invertible (you need at least A to be square!), you can solve the
system by:
identity
1
Computing A−1
We cannot invert the matrix A, so A−1 does not exist.
2
Compute the solution x = A−1 b.
Solve the linear system given by
Matrices. XVII
x1 + 3x2 + 3x3
=
1
x1 + 3x2 + 4x3
=
−1
x1 + 4x2 + 3x3
=
2.
Matrices. XVIII
SOLUTION: We can rewrite this as the matrix system:
1
1
1
|
We compute
3
3
4
{z
A
A−1
and so
x1
x2
x3
=
=
3
1
x1
4 x2 = −1 ,
3
2
x3
} | {z } | {z }
x
7
= −1
−1
−3
0
1
b
What is the solution of
−3
1 ,
0
1
7
−3 −3
A−1 b = −1
0
1 −1
2
−1
1
0
4
7+3−6
−1 + 0 + 2 = 1 .
−2
−1 − 1 + 0
Therefore x1 = 4, x2 = 1 and x3 = −2.
ANSWER: The solution to the system is given by x1 = 4, x2 = 1 and x3 = −2.
EXERCISE: Check that this is the solution to the linear system.
x1 + 3x2 + 3x3
=
−2
x1 + 3x2 + 4x3
=
1
x1 + 4x2 + 3x3
=
−3
?
Matrices. XIX
Matrices. XX
Example of application of Matrices:
Matrix as an object in programming language: Matlab
Useful for signal/image processing
Next exercise: application to tting a specic curve to a set of points.
The curve y = a · x2 + b · x + c passes through the points (x1 = 0, y1 = 0),
and (x3 = −2, y3 = 4).
(x2 = 1, y2 = 1)
Find the coefcients a, b and c.
© Copyright 2026 Paperzz