0% found this document useful (0 votes)
5 views47 pages

Lecture 06

The document introduces matrices and defines some key terms. A matrix is a rectangular arrangement of numbers whose position has significance. Matrices are described by their order or size, such as a 3x4 matrix having 3 rows and 4 columns. Square matrices have an equal number of rows and columns, while a column matrix only has a single column.

Uploaded by

Ismail Mtumwa
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)
5 views47 pages

Lecture 06

The document introduces matrices and defines some key terms. A matrix is a rectangular arrangement of numbers whose position has significance. Matrices are described by their order or size, such as a 3x4 matrix having 3 rows and 4 columns. Square matrices have an equal number of rows and columns, while a column matrix only has a single column.

Uploaded by

Ismail Mtumwa
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/ 47

Introduction Matrix Operations Special Matrices

Matrices

E. Mujuni

December 21, 2020


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

A matrix is a rectangular arrangement of numbers (or, in some


cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix, e.g.
 
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25

The numbers (or symbols) in the matrix are referred to as


elements or entries.
Matrices are often described in terms of their order (or size, or
shape). The matrix given above has 3 rows and 4 columns. Its
order is consequently 3 × 4, and we refer to it as a 3 × 4 matrix.
A matrix which has an equal number n of rows and columns (i.e.
is a n × n matrix) is called a square matrix. e.g.,
 
5 3 1  
 4 7 9  or 6 3
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction Matrix Operations Special Matrices

Notation

A general m × n matrix A may be written as


 
a11 a12 · · · a1n
 a21 a22 · · · a2n 
A=  ··· ··· ··· ···


am1 am2 · · · amn

where the element in the i th row and j th column is denoted aij .

Definition
Two matrices A and B are equal if they are the same order and
aij = bij for all i and j.
Introduction Matrix Operations Special Matrices

Notation

A general m × n matrix A may be written as


 
a11 a12 · · · a1n
 a21 a22 · · · a2n 
A=  ··· ··· ··· ···


am1 am2 · · · amn

where the element in the i th row and j th column is denoted aij .

Definition
Two matrices A and B are equal if they are the same order and
aij = bij for all i and j.
Introduction Matrix Operations Special Matrices

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or subtraction
is done bf element-wise.
For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B =
7 6 10
and  
−6 −7 3
A−B =
1 4 2
but A + C and A − C do not exist.
Introduction Matrix Operations Special Matrices

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or subtraction
is done bf element-wise.
For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B =
7 6 10
and  
−6 −7 3
A−B =
1 4 2
but A + C and A − C do not exist.
Introduction Matrix Operations Special Matrices

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or subtraction
is done bf element-wise.
For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B =
7 6 10
and  
−6 −7 3
A−B =
1 4 2
but A + C and A − C do not exist.
Introduction Matrix Operations Special Matrices

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or subtraction
is done bf element-wise.
For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B =
7 6 10
and  
−6 −7 3
A−B =
1 4 2
but A + C and A − C do not exist.
Introduction Matrix Operations Special Matrices

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or subtraction
is done bf element-wise.
For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B =
7 6 10
and  
−6 −7 3
A−B =
1 4 2
but A + C and A − C do not exist.
Introduction Matrix Operations Special Matrices

Scalar Multiplication

Given a matrix A, we calculate kA by multiplying every element of


A by the scalar k .
For example, if  
1 2 3
A=
4 5 6
then  
7 14 21
7A =
28 35 42
Introduction Matrix Operations Special Matrices

Scalar Multiplication

Given a matrix A, we calculate kA by multiplying every element of


A by the scalar k .
For example, if  
1 2 3
A=
4 5 6
then  
7 14 21
7A =
28 35 42
Introduction Matrix Operations Special Matrices

Scalar Multiplication

Given a matrix A, we calculate kA by multiplying every element of


A by the scalar k .
For example, if  
1 2 3
A=
4 5 6
then  
7 14 21
7A =
28 35 42
Introduction Matrix Operations Special Matrices

Multiplication of two Matrices

Not all matrices may be multiplied! Two matrices may be


multiplied together only if they are compatible,that is, the
number of columns of the first matrix must equal the number of
rows of the second matrix.
That is, if A is a m × n matrix and B is a r × p matrix then we can
calculate AB only if n = r .

Definition
The product C = AB of an m × n matrix A = [aij ] and an r × p matrix
B = [bjk ] is defined only if and only if r = n and then C = [cik ] is
defined as the m × p with the entries
n
X
cik = aij bjk = ai1 b1k + ai2 b2k + . . . + ain bnk
j=1
Introduction Matrix Operations Special Matrices

Multiplication of two Matrices

Not all matrices may be multiplied! Two matrices may be


multiplied together only if they are compatible,that is, the
number of columns of the first matrix must equal the number of
rows of the second matrix.
That is, if A is a m × n matrix and B is a r × p matrix then we can
calculate AB only if n = r .

Definition
The product C = AB of an m × n matrix A = [aij ] and an r × p matrix
B = [bjk ] is defined only if and only if r = n and then C = [cik ] is
defined as the m × p with the entries
n
X
cik = aij bjk = ai1 b1k + ai2 b2k + . . . + ain bnk
j=1
Introduction Matrix Operations Special Matrices

Multiplication of two Matrices

Not all matrices may be multiplied! Two matrices may be


multiplied together only if they are compatible,that is, the
number of columns of the first matrix must equal the number of
rows of the second matrix.
That is, if A is a m × n matrix and B is a r × p matrix then we can
calculate AB only if n = r .

Definition
The product C = AB of an m × n matrix A = [aij ] and an r × p matrix
B = [bjk ] is defined only if and only if r = n and then C = [cik ] is
defined as the m × p with the entries
n
X
cik = aij bjk = ai1 b1k + ai2 b2k + . . . + ain bnk
j=1
Introduction Matrix Operations Special Matrices

Multiplication of two Matrices

Not all matrices may be multiplied! Two matrices may be


multiplied together only if they are compatible,that is, the
number of columns of the first matrix must equal the number of
rows of the second matrix.
That is, if A is a m × n matrix and B is a r × p matrix then we can
calculate AB only if n = r .

Definition
The product C = AB of an m × n matrix A = [aij ] and an r × p matrix
B = [bjk ] is defined only if and only if r = n and then C = [cik ] is
defined as the m × p with the entries
n
X
cik = aij bjk = ai1 b1k + ai2 b2k + . . . + ain bnk
j=1
Introduction Matrix Operations Special Matrices

Example
 
  0 1
1 3 4
Given A = and B =  3 8 
6 2 5
9 2
Find AB and BA.

Solution
 
  0 1  
1 3 4  3 45 33
AB = 8 =

6 2 5 51 32
9 2
   
0 1   6 2 5
1 3 4
BA =  3 8  =  51 25 52 
6 2 5
9 2 21 31 46
Introduction Matrix Operations Special Matrices

Example
 
  0 1
1 3 4
Given A = and B =  3 8 
6 2 5
9 2
Find AB and BA.

Solution
 
  0 1  
1 3 4  3 45 33
AB = 8 =

6 2 5 51 32
9 2
   
0 1   6 2 5
1 3 4
BA =  3 8  =  51 25 52 
6 2 5
9 2 21 31 46
Introduction Matrix Operations Special Matrices

Example
 
  0 1
1 3 4
Given A = and B =  3 8 
6 2 5
9 2
Find AB and BA.

Solution
 
  0 1  
1 3 4  3 45 33
AB = 8 =

6 2 5 51 32
9 2
   
0 1   6 2 5
1 3 4
BA =  3 8  =  51 25 52 
6 2 5
9 2 21 31 46
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Properties of Matrix Multiplication

(a) AB 6= BA in general

(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.

(c) kAB = k(AB) = A(kB)

(d) A(BC) = (AB)C

(e) A(B + C) = AB + AC

(f) (A + B)C = AC + BC
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
4 7 2
 
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
4 7 2
 
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
4 7 2
 
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
  4 7 2
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
  4 7 2
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
  4 7 2
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Power of a Matrix
Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by
multiplying A by itself the required number of times.
That is, A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix obtained
when the rows and columns
 of A are interchanged.
6 3 5
For example, if A =
  4 7 2
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = B T AT
T T
Introduction Matrix Operations Special Matrices

Special Matrices

Zero Matrix
A zero matrix is a matrix of any size in which every element is
zero.
Identity Matrix
An identity matrix is a square matrix with zeros everywhere
except along the leading diagonal where every element is a 1.
Example,  
  1 0 0
1 0
and  0 1 0 
0 1
0 0 1
For any matrix A there is an identity matrix I such that AI = A.
There is also an identity matrix I such that IA = A. The identity
matrix functions like the number 1 in real arithmetic.
Introduction Matrix Operations Special Matrices

Special Matrices

Zero Matrix
A zero matrix is a matrix of any size in which every element is
zero.
Identity Matrix
An identity matrix is a square matrix with zeros everywhere
except along the leading diagonal where every element is a 1.
Example,  
  1 0 0
1 0
and  0 1 0 
0 1
0 0 1
For any matrix A there is an identity matrix I such that AI = A.
There is also an identity matrix I such that IA = A. The identity
matrix functions like the number 1 in real arithmetic.
Introduction Matrix Operations Special Matrices

Special Matrices

Zero Matrix
A zero matrix is a matrix of any size in which every element is
zero.
Identity Matrix
An identity matrix is a square matrix with zeros everywhere
except along the leading diagonal where every element is a 1.
Example,  
  1 0 0
1 0
and  0 1 0 
0 1
0 0 1
For any matrix A there is an identity matrix I such that AI = A.
There is also an identity matrix I such that IA = A. The identity
matrix functions like the number 1 in real arithmetic.
Introduction Matrix Operations Special Matrices

Special Matrices

Zero Matrix
A zero matrix is a matrix of any size in which every element is
zero.
Identity Matrix
An identity matrix is a square matrix with zeros everywhere
except along the leading diagonal where every element is a 1.
Example,  
  1 0 0
1 0
and  0 1 0 
0 1
0 0 1
For any matrix A there is an identity matrix I such that AI = A.
There is also an identity matrix I such that IA = A. The identity
matrix functions like the number 1 in real arithmetic.
Introduction Matrix Operations Special Matrices

Special Matrices

Diagonal Matrix
A diagonal matrix is a square matrix with zeros everywhere
except along the leading diagonal where there are some
non-zero elements, e.g.
 
  4 0 0
5 0
and  0 6 0 
0 2
0 0 0

Upper Triangular Matrix


An upper triangular matrix is a square matrix with zeros
everywhere below the leading diagonal
Lower Triangular Matrix
A lower triangular matrix is a square matrix with zeros
everywhere above the leading diagonal
Introduction Matrix Operations Special Matrices

Special Matrices

Diagonal Matrix
A diagonal matrix is a square matrix with zeros everywhere
except along the leading diagonal where there are some
non-zero elements, e.g.
 
  4 0 0
5 0
and  0 6 0 
0 2
0 0 0

Upper Triangular Matrix


An upper triangular matrix is a square matrix with zeros
everywhere below the leading diagonal
Lower Triangular Matrix
A lower triangular matrix is a square matrix with zeros
everywhere above the leading diagonal
Introduction Matrix Operations Special Matrices

Special Matrices

Diagonal Matrix
A diagonal matrix is a square matrix with zeros everywhere
except along the leading diagonal where there are some
non-zero elements, e.g.
 
  4 0 0
5 0
and  0 6 0 
0 2
0 0 0

Upper Triangular Matrix


An upper triangular matrix is a square matrix with zeros
everywhere below the leading diagonal
Lower Triangular Matrix
A lower triangular matrix is a square matrix with zeros
everywhere above the leading diagonal
Introduction Matrix Operations Special Matrices

Special Matrices

Symetric Matrix
A symmetric matrix A is a square matrix with the property that
AT = A.
Skew-Symmetrix Matrix
A skew-symmetric matrix A is a square matrix with the property
that AT = −A.
Inverse of a Matrix
The inverse of a matrix A, if it exists, is denoted by A−1. The
inverse A−1 has the property that

AA−1 = A−1 A = I

You might also like