Professional Documents
Culture Documents
Faculty of Engineering
Department of Civil Engineering
Matrices
Prepared by
Halgurd Sulaiman
Email: Halgurd.hussein@soran.edu.iq
2020-2021
Matrices
Definitions
A matrix is a rectangular array of numbers of the form
• We usually use capital letters (for example, 𝐴, 𝐵, 𝐶, …) for the names of matrices,
and we usually use lowercase letters (for example, 𝑎, 𝑏, 𝑐, …) 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 𝑘th row and 𝑙th column of a matrix A is denoted by 𝑎𝑘𝑙 .
• A matrix with m rows and n columns is called an 𝑚 × 𝑛 matrix, or a matrix of
order 𝑚 × 𝑛.
Example 1:
2 −3 4 5
(a) 𝐴 = [6 7 4 3] is a 3 × 4 matrix since it has 3 rows and 4 columns.
3 1 2 4
The entry in the 2nd row and 4th column of 𝐴 is 3, and so we write 𝑎24 = 3.
Definition: 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.
Definition: 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.
Definition: A diagonal matrix is a square matrix in which all of the entries which are
not on the main diagonal must equal zero.
Definition: A triangular matrix is a square matrix in which
All the entries which lie below the main diagonal are zero, or
All the entries which lie above the main diagonal are zero.
Matrix Operations
Matrix equality. Two matrices are equal if they have the same order and their
corresponding entries are equal.
𝑎 𝑏 𝑒 𝑓
Let 𝐴 = [ ] and 𝐵 = [ ]. Then 𝐴 = 𝐵 if and only if 𝑎 = 𝑒, 𝑏 = 𝑓, 𝑐 =
𝑐 𝑑 𝑔 ℎ
𝑔 and 𝑑 = ℎ.
Matrix addition. Two matrices can be added if they have the same size. We add two
such matrices by adding the corresponding entries.
𝑎 𝑏 𝑒 𝑓 𝑎 𝑏 𝑒 𝑓
If 𝐴 = [ ] and 𝐵 = [ ], then 𝐴 + 𝐵 = [ ]+[ ]
𝑐 𝑑 𝑔 ℎ 𝑐 𝑑 𝑔 ℎ
𝑎+𝑒 𝑏+𝑓
=[ ]
𝑐+𝑔 𝑑+ℎ
For example,
1 3 4 0 1+4 3+0 5 3
[ ]+[ ]=[ ]=[ ]
2 −1 −1 −3 2 + (−1) −1 + (−3) 1 −4
Scalar multiplication. Any matrix can be multiplied by a single number (scalar). We
do this by multiplying all the entries of the matrix by that number.
𝑎 𝑏 𝑎 𝑏 𝑘𝑎 𝑘𝑏
If 𝐴 = [ ] and 𝑘 is scalar, then 𝑘𝐴 = 𝑘 [ ]=[ ]
𝑐 𝑑 𝑐 𝑑 𝑘𝑐 𝑘𝑑
For example,
𝟏 𝟑 𝟒 𝟏𝟐
𝟒[ ]=[ ]
𝟐 −𝟏 𝟖 −𝟒
Matrix multiplication. The product 𝐴𝐵 of two matrices 𝐴 and 𝐵 is defined if and
only if the number of columns of 𝐴 is equal to the number of rows of 𝐵.
To calculate the entry in the (𝑖, 𝑗) position (that is, in the 𝑖 𝑡ℎ row and 𝑗𝑡ℎ column) of
𝐴𝐵, we multiply the 𝑖 𝑡ℎ row of A by the 𝑗𝑡ℎ column of B.
𝑎 𝑏 𝑒 𝑓 𝑎 𝑏 𝑒 𝑓
i-e If 𝐴 = [ ] and 𝐵 = [ ], then 𝐴 × 𝐵 = [ ] × [𝑔 ]
𝑐 𝑑 𝑔 ℎ 𝑐 𝑑 ℎ
𝑎𝑒 + 𝑏𝑔 𝑎𝑓 + 𝑏ℎ
=[ ]
𝑐𝑒 + 𝑑𝑔 𝑐𝑓 + 𝑑ℎ
For example,
Multiplication Properties
Provided that each of the following matrix products exists, we have
𝐴(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐶
(𝐵 + 𝐶)𝐴 = 𝐵𝐴 + 𝐶𝐴
𝐴(𝐵𝐶) = (𝐴𝐵)𝐶
However, usually 𝐴𝐵 ≠ 𝐵𝐴
For a square matrix 𝐴, we have:
𝐴𝑂 = 𝑂 = 𝑂𝐴
and 𝐴𝐼 = 𝐴 = 𝐼𝐴
where 𝐼 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 𝐴.
Note: It is important to realize that, if we choose any two matrices A and B, then
usually 𝐴𝐵 ≠ 𝐵𝐴
For example, consider the matrices A and B given below:
The matrix determinant
Definition: A value called the determinant of 𝐴, that we denote by
det(𝑎) or |𝐴|,
corresponds to every square matrix𝐴. We will avoid the formal definition of the
determinant (that implies notions of permutations) for now and we will concentrate
instead on its calculation.
For example;
Given the matrix
2 5
𝐴=[ ]
3 4
The determinant of 𝐴 is
2 5
det(𝐴) = | | = 2 × 4 − 5 × 3 = −7
3 4
The determinant of a matrix is a value associated with a matrix. You can only find the
determinant of a square matrix (2 rows and 2 columns, 3 rows and 3 columns, etc.).
The determinant of the matrix can be used to solve systems of equations, but first we
need to discuss how to find the determinant of a matrix. Here we will be learning how
to find the determinant of a 3×3 matrix.
There are a few different ways to find the determinant of a 3 × 3 matrix. I have chosen
to show this technique because it seems a lot easier for me to remember. I do not have
to worry about things like minors and cofactors. If you know another way to find the
determinant of a 3 × 3 matrix consider giving this technique a try.
Here are the steps we follow to find the determinant of a 3×3 matrix:
The steps are a lot easier to understand when you look at some examples, so here we
go.
𝑎 𝑏 𝑐 𝑎 𝑏 𝑐 𝑎 𝑏
If 𝐴 = [𝑑 𝑒 𝑓], then det(𝐴) = |𝑑 𝑒 𝑓| 𝑑 𝑒
𝑔 ℎ 𝑖 𝑔 ℎ 𝑖 𝑔 ℎ
= (𝑎𝑒𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ) − (𝑐𝑒𝑔 + 𝑎𝑓ℎ + 𝑏𝑑𝑖)
Cramer’s Rule
Cramer’s rule is a method for solving linear simultaneous equations. It makes use of
determinants and so a knowledge of these is necessary before proceeding.
|𝐴𝑖 |
𝑋𝑖 =
|𝐴|
The first special determinant 𝐴1 is found by replacing the first column of the primary
matrix with the constant 𝑑 column. The new special matrix 𝐴1 now appears as:
Likewise, the same procedure is done to find the second special determinant 𝐴2 ,
Using:
|𝐴𝑖 |
𝑋𝑖 =
|𝐴|
We get,
Solution: