0% found this document useful (0 votes)
38 views29 pages

MATH-224 - LectureNotes 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views29 pages

MATH-224 - LectureNotes 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

MATH-224

LINEAR ALGEBRA AND FURTHER CALCULUS

Lecture 2: Addition of Matrices, Scalar Multiplication of a


Matrix, Matrix Multiplication, Transpose of a Matrix, and
Determinant of an n × n Matrix

Course Lecturers: Dr. M. Maliyoni & Mr. B. Malipa

Applied Studies Department, MUST

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 1 / 29


Lesson Outcomes

By the end of this lesson, you should be able to:


Add matrices.
Multiply a matrix by a scalar.
Multiply a matrix by another matrix.
Find the transpose of any given matrix.
Compute the determinant of a square matrix.

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 2 / 29


Introduction

We welcome you to the second lesson of this course. Please note that
we are still looking at Matrices.
In the previous lesson, you learnt about the definition of a matrix,
matrix notation, order (or size) of a matrix, and types of matrices.
In this lesson, we will continue from where we stopped in lesson 1.
Thus, we will discuss other concepts about Matrices and these are:
addition of matrices, scalar multiplication of a matrix, matrix
multiplication, transpose of a matrix, and determinant of an n × n
matrix.
Please ensure that you have a scientific calculator which will be used
at some point in this course.

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 3 / 29


Addition of Matrices

Matrices can be added if and only if they are of the same order. Thus, if
A = (aij ) and B = (bij ), then the sum of A and B is a matrix

A + B = (aij + bij )

Remark
Here, you add corresponding elements aij + bij

Example
     
1 2 5 −2 1 2 3
If A = ,B= and C = . Find (i) A + B (ii)
3 4 1 2 4 5 6
A + C.

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 4 / 29


Solution
(i)
   
1 2 5 −2
A+B = +
3 4 1 2
 
1 + 5 2 + (−2)
=
3+1 4+2
 
6 0
=
4 6

(ii) A + C does not exist since A is a 2 × 2 matrix and C is a 2 × 3 matrix,


that is, they are not of the same order as such they cannot be added.

Remark
If A and B are matrices of the same order then the difference is found by
subtracting the corresponding elements aij − bij = aij + (−bij ).

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 5 / 29


Scalar Multiplication of a Matrix

A real number is referred to as a scalar when it occurs in operations


involving matrices.
When a matrix is multiplied by a scalar, every element in the matrix
is multiplied by that scalar.

Example
 
1 −3
Let A = . Then
2 8
   
1 −3 2 × 1 2 × (−3)
2A = 2 =
2 8 2×2 2×8
 
2 −6
=
4 16

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 6 / 29


Matrix Multiplication

Definition
Let A be an m × n matrix and B be a p × q matrix. Then the matrix AB
is only defined (or A and B are conformable to multiplication) if the
number of columns of A is equal to the number of rows of B. i.e. AB is
only defined if n = p

It follows therefore from the definition that:


1. Two matrices A and B can be multiplied if and only if the number of
columns in A is equal to the number of rows in B. The product
matrix is denoted AB.
2. In this case, we say that matrices A and B are conformable for
multiplication.
3. The product matrix AB has the same number of rows as A and the
same number of columns as B. Thus, if A is a matrix of order m × n
and B is of order n × p, then matrix AB will be of order m × p.
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 7 / 29
Now, if A and B are conformable for multiplication and
 
A = a1 a2 a3 · · · an and
 
b1
b2 
 
B = b3  , then
 
 .. 
.
bn
 
b1
 b2 
 
· · · an  b 3 

AB = a1 a2 a3
 
 .. 
.
bn
 
= a1 b1 + a2 b2 + a3 b3 + · · · + an bn
n
X
= ak bk
k=1

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 8 / 29


Example
 
   4
1 2 2 3 1
Let A = ,B= and C = −2 . Find (i) AB (ii) BC
3 4 −2 4 5
3

Solution
(i) Matrix A is of order 2 × 2 and B is 2 × 3. Since the number of
columns in A is equal to the number of rows in B, the matrices can
be multiplied. Thus, the product matrix AB will be of order 2 × 3.
  
1 2 2 3 1
AB =
3 4 −2 4 5
 
1 × 2 + 2 × −2 1 × 3 + 2 × 4 1 × 1 + 2 × 5
=
3 × 2 + 4 × −2 3 × 3 + 4 × 4 3 × 1 + 4 × 5
 
−2 11 11
=
−2 25 23

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 9 / 29


(ii)
 
 4

2 3 1  
BC = −2
−2 4 5
3
   
2 × 4 + 3 × −2 + 1 × 3 5
= =
−2 × 4 + 4 × −2 + 5 × 3 −1

NOTE: B : 2 × 3, C : 3 × 1 and BC : 2 × 1
Remark
(i) Matrix multiplication is not commutative. If AB is defined, it does
not necessarily mean that BA is also defined. For example, consider
the two matrices A : m × n and B : n × p. AB is defined but BA is
not defined.
(ii) AB and BA are both defined if and only if A is an m × n matrix and
B is an n × m matrix.
(iii) Even if AB and BA are both defined, it does not necessarily mean
that they are equal.
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 10 / 29
Properties of Multiplication of Matrices
(i) Multiplication is distributive with respect to addition. If A, B and C
are m × n, n × p and n × p matrices respectively, then

A(B + C ) = AB + AC

(ii) Multiplication is associative if conformability is assured. If A, B and


C are m × n, n × p and p × q matrices respectively, then

(AB)C = A(BC )

.
(iii) If A is n × m and O is m × n, then

AO = O = OA

(iv) AB = 0 (null/zero matrix) does not necessarily mean imply that


A = 0 or B = 0 or both are 0.

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 11 / 29


Properties of multiplication of Matrices
(v) Multiplication of a matrix by an identity matrix. If A is a square
matrix of order n × n and I is an identity matrix of the same order,
then
AI = A = IA
(vi) Multiplication of a matrix by itself. If A is a square matrix of order
n × n, then A · A will also be a square matrix of the same order.

NOTE:
A · A = A2
AAA = A2 A = (AA)A = A(AA) = A3 (by associative law)
In general, A · A · A · · · n times = An
Remark
If I is a unit matrix, then

I = I2 = I3 = ··· = In

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 12 / 29


Transpose of a Matrix

Definition
The transpose of a matrix is found by interchanging rows and columns of
a matrix. Thus, if matrix A = (aij ), then the transpose of A is:
A = (aji ) where j is the column number and i is the row number in matrix
A. The transpose of a matrix is denoted by A0 or AT .

NOTE: AT is an n × m matrix.
Example
 
  1 5
1 3
If A = and B =  2 6. Find (i) AT (ii) B T
4 2
−1 7

Solution
Rows become
 columns
 and vice
 versa 
1 4 1 2 −1
(i) AT = (ii) B T =
3 2 5 6 7
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 13 / 29
Properties of Transpose of a Matrix
(i) If A is a matrix of order n × m, then AT will be a matrix of order
m × n.
(ii) The transpose of a row matrix is a column matrix and vice versa.
(iii) (AT )T = A.

Example
     
1 2 T 1 3 T T 1 2
Let A = . A = and (A ) = =A
3 4 2 4 3 4

(iv) The transpose of the sum of two matrices is the sum of their
individual transposes. That is

(A + B)T = AT + B T
(v) (AB)T = B T AT

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 14 / 29


The Determinant of a Matrix
Determinants play an important role in finding the inverse of a matrix
and also in solving systems of linear equations.
Determinants exists for square matrices n × n only.
The determinant of a matrix A is denoted by det(A) or |A|.
In this lesson, we will consider the determinant of 2 × 2 and 3 × 3
matrices and note that the n × n case follows from these.
Determinant of a 2 × 2 Matrix
 
a11 a12
The determinant of the matrix A = is given by
a21 a22

det(A) = |A| = a11 a22 − a21 a12

NOTE: det(A) and |A| are used interchangeably to represent the


determinant of a matrix. It is also a common practice to write the
a a
determinant of matrix A as |A| = 11 12
a21 a22
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 15 / 29
Example
Find the determinant
  of the following
 matrices;
1 2 6 4
(a) B = (b) X = .
−1 3 3 2

Solutions
1 2
(i) |B| = = (1)(3) − (−1)(2) = 3 + 2 = 5
−1 3
6 4
(ii) det(A) = = (6)(2) − (3)(4) = 12 − 12 = 0
3 2

Example
 
x − 1 −2
Given that A = . Find all values of x for which |A| = 0
1 x −4

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 16 / 29


Solution
Firstly, you find the determinant of A and then equate it to zero. Finally,
solve for x in the resulting equation.
x − 1 −2
|A| = = (x − 1)(x − 4) + 2 = 0
1 x −4
⇒ x 2 − 5x + 4 + 2 = 0
⇒ x 2 − 5x + 6 = 0
⇒ (x − 2)(x − 3) = 0
∴ x = 2 or x = 3

You will first need to know a few concepts before being able to evaluate
the determinant of a 3 × 3 matrix (or all other matrices of greater
dimension).

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 17 / 29


Minor of Matrix Entries
Let A be a square matrix. For each entry Aij of A, we define the minor Mij
of Aij to be the determinant of a 2 × 2 matrix which remains when the ith
row and the jth column (i.e. the row and column containing Aij ) are
deleted from A.

Example
 
1 3 0
Let A =  2 −2 1 . Find M11 , M23 and M31 .
−4 1 −1

Solution
−2 1
M11 = = (−2)(−1) − (1)(1) = 2 − 1 = 1 - (Delete the row and column
1 −1
.
containing element A11 = 1 in A and compute the determinant of the resulting 2 × 2 matrix)

1 3
M23 = = 1 − (−4)(3) = 1 + 12 = 13
−4 1
3 0
M31 = = (1)(3) − (−2)(0) = 2 − 1 = 3
−2 1
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 18 / 29
NOTE: Each of the 9 elements in the example above has a minor.
Co-factor of Matrix Entries
We define the co-factor Cij of the entry Aij of A as follows:

Cij = (−1)i+j Mij

.
Thus,

Cij = Mij if i + j is even


Cij = −Mij if i + j is odd

Note that the co-factor and the minor always have the same
numerical value, with the possible exception of the sign, according to
the following pattern which corresponds to the entries.
 
+ − +
− + −
+ − +
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 19 / 29
Example
Using the previous example, find C11 , C23 and C31 .

Solution

C11 = M11 = 1
C23 = −M23 = −13
C31 = M31 = 3

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 20 / 29


Determinant of a 3 × 3 Matrix

There are two methods that can be used to calculate the determinant of a
3 × 3 matrix.
1. Co-factor Expansion Method
Given a square matrix A and its co-factors Cij , the determinant of a 3 × 3
matrix (or for sizes bigger than 3 × 3) is obtained by co-factor expansion
as follows:
(i) Choose a row or column of A (if possible, choose a row or column
containing most zeroes).
(ii) Multiply each of the elements Aij of the row (or column) chosen by
its corresponding co-factor Cij .
(iii) Add the results.

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 21 / 29


Consider the following matrix
 
A11 A12 A13
A = A21 A22 A23  .
A31 A32 A33

Then, we define
|A| = A11 C11 + A12 C12 + A13 C13 (Expansion along the first row) or
|A| = A13 C13 + A23 C23 + A33 C33 (Expansion along the third column).

Example
 
2 1 3
Let A = −1 2 1. Find det(A).
−2 2 3

Solution
Choosing the first row, the co-factors of its elements are
C11 = 4, C12 = 1, C13 = 2

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 22 / 29


Hence,

det(A) = A11 C11 + A12 C12 + A13 C13


= (2)(4) + (1)(1) + (3)(2)
=8+1+6
= 15

An alternative way of using the co-factor expansion method is shown


below.
2 1 −1 1 −1 2
|A| = 2 −1 +3
2 3 −2 3 −2 2
= 2(6 − 2) − (−3 + 2) + 3(−2 + 4)
= 2(4) − 1(−1) + 3(2)
=8+1+6
= 15

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 23 / 29


2. Basket-Weave Method
The determinant of a 3 × 3 matrix A can also be found using the
basket-weave method which involves the following:
(i) Write down A, and write its first 2 columns again on the right of A.
(ii) det(A) is given by:
(sum of products along right slanting diagonals)-(sum of products
along left slanting diagonals)
Using the previous example, we have

det(A) = [(2)(2)(3) + (1)(1)(−2) + (3)(−1)(2)] − [(3)(2)(−2) + (2)(1)(2) +


= 12 − 2 − 6 − (−12 + 4 − 3)
= 4 − (−11)
= 15
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 24 / 29
NOTE: The basket-weave method also works if the first two rows of a
given matrix are added below the matrix as shown below:

det(A) = 15

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 25 / 29


Example
 
1 0 3
Compute the determinant of matrix B = 4 0 −1.
2 8 6

Solutions
Expanding along the second column, we have
1 3
|B| = −8 = −8(−1 − 12) = −8(−13) = 104
4 −1
OR

det(A) = 0 + 0 + 96 − (0 − 8 + 0) = 96 + 8 = 104

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 26 / 29


Some Properties of the Determinant
1. The determinant of a matrix and its transpose are equal.
2. If two rows or columns of A are equal, then det A is equal to zero (0).
3. If a row or column consists entirely of zeros then det(A) = 0
4. If one row or column is a factor of the other then det (A) = 0.
5. If a matrix A is upper or lower triangular then |A| = a11 a22 a33 · · · ann
6. The determinant of matrix AB is the determinant of their product i.e.

|AB| = |A||B|

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 27 / 29


Conclusion
(a) In this lesson, a number of concepts have been covered and these are:
Addition of matrices.
Scalar multiplication of matrices.
Matrix multiplication.
Transpose of a matrix.
Determinant of square matrices.
(b) For further reading, please refer to MATH-224 Module Study Guide,
Pages 7-22 and the attached handwritten notes Pages 7-22. Also,
read about Singular and Non-Singular Matrices on Page 23(a) of
the handwritten notes.
(c) In case you have questions about this lesson, please do not hesitate to
ask us using the discussion forum on this platform and we will be glad
to address them.
(d) It is our hope that this lesson was interesting and you cannot wait for
the next lesson which will cover some more important and interesting
concepts of Matrices.
(e) We wish you the best of luck. Stay safe. COVID-19 is real!
(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 28 / 29
END OF LECTURE 2

THANK YOU!

(Maliyoni & Malipa, MUST) MATH-224 Lecture 2 2019/2020 Academic Year 29 / 29

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy