0% found this document useful (0 votes)
19 views86 pages

1.3 Matrices and Matrix Operations

Uploaded by

bhekib125
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
19 views86 pages

1.3 Matrices and Matrix Operations

Uploaded by

bhekib125
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 86

Section 1.

3: Matrices and matrix operations

Dr K
Department of Mathematics and Applied Mathemathematics
University of Johannesburg

Dr K Matrices and matrix operations


Contents

1 Matrix Notation and Terminology

2 Operations on Matrices

3 Transpose of a Matrix

4 Trace of a Matrix

5 Partitioned Matrices

6 Matrix Products as Linear Combinations

Dr K Matrices and matrix operations


Definition
A matrix is a rectangular array of numbers. The numbers in the
array are called the entries in the matrix.

Example
 
  2
2 1 −5 −2 ,
 2

, −1 3 3 .
3 −2 4
3

Definition
The size of a matrix: a matrix is called m × n if it has m rows
(horizontal lines) and n columns (vertical lines).
A 1 × n matrix is called a row matrix (or row vector).
A m × 1 matrix is called a column matrix (or column
vector).
 
Row or column vectors are denoted with a bar: a = 1 2 3 .
Dr K Matrices and matrix operations
Definition
A matrix is a rectangular array of numbers. The numbers in the
array are called the entries in the matrix.

Example
 
  2
2 1 −5 −2 ,
 2

, −1 3 3 .
3 −2 4
3

Definition
The size of a matrix: a matrix is called m × n if it has m rows
(horizontal lines) and n columns (vertical lines).
A 1 × n matrix is called a row matrix (or row vector).
A m × 1 matrix is called a column matrix (or column
vector).
 
Row or column vectors are denoted with a bar: a = 1 2 3 .
Dr K Matrices and matrix operations
Definition
A matrix is a rectangular array of numbers. The numbers in the
array are called the entries in the matrix.

Example
 
  2
2 1 −5 −2 ,
 2

, −1 3 3 .
3 −2 4
3

Definition
The size of a matrix: a matrix is called m × n if it has m rows
(horizontal lines) and n columns (vertical lines).
A 1 × n matrix is called a row matrix (or row vector).
A m × 1 matrix is called a column matrix (or column
vector).
 
Row or column vectors are denoted with a bar: a = 1 2 3 .
Dr K Matrices and matrix operations
Definition
A matrix is a rectangular array of numbers. The numbers in the
array are called the entries in the matrix.

Example
 
  2
2 1 −5 −2 ,
 2

, −1 3 3 .
3 −2 4
3

Definition
The size of a matrix: a matrix is called m × n if it has m rows
(horizontal lines) and n columns (vertical lines).
A 1 × n matrix is called a row matrix (or row vector).
A m × 1 matrix is called a column matrix (or column
vector).
 
Row or column vectors are denoted with a bar: a = 1 2 3 .
Dr K Matrices and matrix operations
Notation

The entry of A in row i and column j is denoted by aij .


 
a11 a12 ... a1n
 a21 a22 ... a2n 
A= .
 
.. .. .. 
 .. . . . 
am1 am2 . . . amn

A = [aij ]m×n = [aij ].


(A)ij = aij .

Dr K Matrices and matrix operations


Square matrices

Definition
 square matrix
A  is an m × n matrix with m = n. eg.
2 3 4
4 −1 0 
1 1 −5
The main diagonal of a square matrix A are the entries
a11 , a22 , a33 , . . ..
An identity matrix is a square matrix with entries
 “1” on its
1 0 0
main diagonal and zeros everywhere else, eg. 0 1 0

0 0 1

Dr K Matrices and matrix operations


Square matrices

Definition
 square matrix
A  is an m × n matrix with m = n. eg.
2 3 4
4 −1 0 
1 1 −5
The main diagonal of a square matrix A are the entries
a11 , a22 , a33 , . . ..
An identity matrix is a square matrix with entries
 “1” on its
1 0 0
main diagonal and zeros everywhere else, eg. 0 1 0

0 0 1

Dr K Matrices and matrix operations


Square matrices

Definition
 square matrix
A  is an m × n matrix with m = n. eg.
2 3 4
4 −1 0 
1 1 −5
The main diagonal of a square matrix A are the entries
a11 , a22 , a33 , . . ..
An identity matrix is a square matrix with entries
 “1” on its
1 0 0
main diagonal and zeros everywhere else, eg. 0 1 0

0 0 1

Dr K Matrices and matrix operations


Square matrices

Definition
 square matrix
A  is an m × n matrix with m = n. eg.
2 3 4
4 −1 0 
1 1 −5
The main diagonal of a square matrix A are the entries
a11 , a22 , a33 , . . ..
An identity matrix is a square matrix with entries
 “1” on its
1 0 0
main diagonal and zeros everywhere else, eg. 0 1 0

0 0 1

Dr K Matrices and matrix operations


Operations on Matrices

Definition
Two matrices are equal if they have the same size and if their
corresponding entries are equal i.e.

A = [aij ]m×n = B = [bij ]r ×s

if and only if

m = r, n = s, aij = bij for all i, j

Dr K Matrices and matrix operations


Operations on Matrices

Definition
Two matrices are equal if they have the same size and if their
corresponding entries are equal i.e.

A = [aij ]m×n = B = [bij ]r ×s

if and only if

m = r, n = s, aij = bij for all i, j

Dr K Matrices and matrix operations


Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Addition and subtraction
Definition
If A and B are matrices of the same size, then the sum A + B is
the matrix obtained by adding the entries of B to the
corresponding entries of A.
The difference A − B is the matrix obtained by subtracting the
entries of B from the corresponding entries of A.

A + B = [aij + bij ] and A − B = [aij − bij ].

Example
   
2 1 0 3 −4 3 5 1
If A = −1 0
 2 4 and B = 2
  2 0 −1.
4 −2 7 0 3 2 −4 5
   
−2 4 5 4 6 −2 −5 2
A+B = 1 2 2 3 ; A − B = −3 −2 2 5 .
7 0 3 5 1 −4 11 −5
Dr K Matrices and matrix operations
Example
 
2 1 0 3
If A = −1 0 2 4
4 −2 7 0
 
3 2
If C = , then C + A =?
1 6

Dr K Matrices and matrix operations


Scalar multiplication

Definition
If A = [aij ] is any matrix and c is a scalar, then the scalar
multiple cA is the matrix obtained by multiplying each entry of
A by c, i.e.,
cA = [caij ]

Example
   
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
   
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5

It is common practice to denote (−1)B by −B and it is called


the negative of B.

Dr K Matrices and matrix operations


Scalar multiplication

Definition
If A = [aij ] is any matrix and c is a scalar, then the scalar
multiple cA is the matrix obtained by multiplying each entry of
A by c, i.e.,
cA = [caij ]

Example
   
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
   
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5

It is common practice to denote (−1)B by −B and it is called


the negative of B.

Dr K Matrices and matrix operations


Scalar multiplication

Definition
If A = [aij ] is any matrix and c is a scalar, then the scalar
multiple cA is the matrix obtained by multiplying each entry of
A by c, i.e.,
cA = [caij ]

Example
   
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
   
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5

It is common practice to denote (−1)B by −B and it is called


the negative of B.

Dr K Matrices and matrix operations


Scalar multiplication

Definition
If A = [aij ] is any matrix and c is a scalar, then the scalar
multiple cA is the matrix obtained by multiplying each entry of
A by c, i.e.,
cA = [caij ]

Example
   
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
   
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5

It is common practice to denote (−1)B by −B and it is called


the negative of B.

Dr K Matrices and matrix operations


Scalar multiplication

Definition
If A = [aij ] is any matrix and c is a scalar, then the scalar
multiple cA is the matrix obtained by multiplying each entry of
A by c, i.e.,
cA = [caij ]

Example
   
2 3 4 0 2 7
Let A = and B = .
1 3 1 −1 3 −5
   
4 6 8 0 −2 −7
Then 2A = and (−1)B = .
2 6 2 1 −3 5

It is common practice to denote (−1)B by −B and it is called


the negative of B.

Dr K Matrices and matrix operations


Addition and scalar multiplication exercises

Example
   
3 −1 0 1 −1 1
Let A = ,B= and
1 2 −4 −2 0 6
 
1 0 −2
C= . Compute A + B − C.
3 1 1
 
3 −2 3
A+B−C =
−4 1 1

Example
   
3 −1 4 a b c
Solve for a, b, c, d, e and f if A = ,B=
2 0 6 d e f
 
7 −7 14
and 3A − 2B = .
6 −6 14
 
1 2 −1
B=
0 3 2

Dr K Matrices and matrix operations


Addition and scalar multiplication exercises

Example
   
3 −1 0 1 −1 1
Let A = ,B= and
1 2 −4 −2 0 6
 
1 0 −2
C= . Compute A + B − C.
3 1 1
 
3 −2 3
A+B−C =
−4 1 1

Example
   
3 −1 4 a b c
Solve for a, b, c, d, e and f if A = ,B=
2 0 6 d e f
 
7 −7 14
and 3A − 2B = .
6 −6 14
 
1 2 −1
B=
0 3 2

Dr K Matrices and matrix operations


Addition and scalar multiplication exercises

Example
   
3 −1 0 1 −1 1
Let A = ,B= and
1 2 −4 −2 0 6
 
1 0 −2
C= . Compute A + B − C.
3 1 1
 
3 −2 3
A+B−C =
−4 1 1

Example
   
3 −1 4 a b c
Solve for a, b, c, d, e and f if A = ,B=
2 0 6 d e f
 
7 −7 14
and 3A − 2B = .
6 −6 14
 
1 2 −1
B=
0 3 2

Dr K Matrices and matrix operations


Addition and scalar multiplication exercises

Example
   
3 −1 0 1 −1 1
Let A = ,B= and
1 2 −4 −2 0 6
 
1 0 −2
C= . Compute A + B − C.
3 1 1
 
3 −2 3
A+B−C =
−4 1 1

Example
   
3 −1 4 a b c
Solve for a, b, c, d, e and f if A = ,B=
2 0 6 d e f
 
7 −7 14
and 3A − 2B = .
6 −6 14
 
1 2 −1
B=
0 3 2

Dr K Matrices and matrix operations


Example
   
1 −1 2 0
Let B = and C = .
−2 0 3 1
Solve for A if
2A + B = I + C.

Dr K Matrices and matrix operations


Matrix multiplication

Definition
If A is an m × r matrix and B is an r × n matrix, then the
product AB is an m × n matrix constructed as follows:
The entry in row i and column j of the product is just the
ith row of A multiplied with the corresponding entries in the jth
column of B or

(AB)ij = ai1 b1j + ai2 b2j + · · · + air brj .

Note
The number of columns of A MUST equal the number of rows
of B to be able to calculate AB.

Dr K Matrices and matrix operations


Matrix multiplication

Definition
If A is an m × r matrix and B is an r × n matrix, then the
product AB is an m × n matrix constructed as follows:
The entry in row i and column j of the product is just the
ith row of A multiplied with the corresponding entries in the jth
column of B or

(AB)ij = ai1 b1j + ai2 b2j + · · · + air brj .

Note
The number of columns of A MUST equal the number of rows
of B to be able to calculate AB.

Dr K Matrices and matrix operations


Matrix multiplication

Definition
If A is an m × r matrix and B is an r × n matrix, then the
product AB is an m × n matrix constructed as follows:
The entry in row i and column j of the product is just the
ith row of A multiplied with the corresponding entries in the jth
column of B or

(AB)ij = ai1 b1j + ai2 b2j + · · · + air brj .

Note
The number of columns of A MUST equal the number of rows
of B to be able to calculate AB.

Dr K Matrices and matrix operations


Matrix multiplication

Definition
If A is an m × r matrix and B is an r × n matrix, then the
product AB is an m × n matrix constructed as follows:
The entry in row i and column j of the product is just the
ith row of A multiplied with the corresponding entries in the jth
column of B or

(AB)ij = ai1 b1j + ai2 b2j + · · · + air brj .

Note
The number of columns of A MUST equal the number of rows
of B to be able to calculate AB.

Dr K Matrices and matrix operations


Matrix multiplication

Definition
If A is an m × r matrix and B is an r × n matrix, then the
product AB is an m × n matrix constructed as follows:
The entry in row i and column j of the product is just the
ith row of A multiplied with the corresponding entries in the jth
column of B or

(AB)ij = ai1 b1j + ai2 b2j + · · · + air brj .

Note
The number of columns of A MUST equal the number of rows
of B to be able to calculate AB.

Dr K Matrices and matrix operations


Matrix multiplication exercise

Example
 
3 0  
4 −1
Let A = −1 2 and B =
  Compute AB and BA if
0 2
1 1
possible.  
12 −3
AB = −4 5
4 1
BA is undefined.

Dr K Matrices and matrix operations


Matrix multiplication exercise

Example
 
3 0  
4 −1
Let A = −1 2 and B =
  Compute AB and BA if
0 2
1 1
possible.  
12 −3
AB = −4 5
4 1
BA is undefined.

Dr K Matrices and matrix operations


Matrix multiplication exercises
Example
Compute the following products
  
3 1 2 −1
 
1
1 0
5 2 −5 3 0 1
 
  3
5 0 −7
 
2 1 22
1 5 9 −1
−1
 
  3 0  
3 1 3 −3 −2 1 −3 −15
0 6
 
1 
 
 4 0 1
4 1 4 0 1  4 0 1
−3 −12 0 −3
 
  1
5 4 0 1 1 [1]
−3
Dr K Matrices and matrix operations
Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Transpose of a Matrix
Definition
The transpose of a m × n matrix A is the n × m matrix AT
obtained by interchanging the rows and columns of A. That is,
the i th column of AT is the i th row of A for all i.
If A = [aij ], then AT = [aijT ] = [aji ]

Example
 
2 1 0 3
Find the transpose of the matrices A = −1 0 2 4,
4 −2 7 0
 
4 −2 1  
B= and C = 3 5 2 .
0 2 3
 
2 −1 4    
4 0 3
T
1 0 −2, B T = −2 T
A =
 2, C = 5
0 2 7
1 3 2
3 4 0

Dr K Matrices and matrix operations


Trace of a Matrix

Definition
If A is a square matrix, then the trace of A, denoted tr(A) is the
sum of the entries on the main diagonal of A.

Example
 
1 2 3
tr 4 5 6 = 1 + 5 + 9 = 15.
7 8 9

If A is not square the trace of A is undefined.

Dr K Matrices and matrix operations


Trace of a Matrix

Definition
If A is a square matrix, then the trace of A, denoted tr(A) is the
sum of the entries on the main diagonal of A.

Example
 
1 2 3
tr 4 5 6 = 1 + 5 + 9 = 15.
7 8 9

If A is not square the trace of A is undefined.

Dr K Matrices and matrix operations


Trace of a Matrix

Definition
If A is a square matrix, then the trace of A, denoted tr(A) is the
sum of the entries on the main diagonal of A.

Example
 
1 2 3
tr 4 5 6 = 1 + 5 + 9 = 15.
7 8 9

If A is not square the trace of A is undefined.

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices


(called submatrices) by inserting horizontal and vertical rules
between selected rows and columns.
 
a11 a12 a13 a14  
A11 A12
A = a21 a22 a23 a24 =
  .
A21 A22
a31 a32 a33 a34
   
a11 a12 a13 a14 r1
A =  a21 a22 a23 a24  = r 2  .
a31 a32 a33 a34 r3
 
a11 a12 a13 a14  
A = a21 a22 a23 a24  = c 1 c 2 c 3 c 4 .

a31 a32 a33 a34

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


Matrix Multiplication: Columns and Rows
The jth column vector of AB is
A[jth column vector of B].
The ith row vector of AB is
[ith row vector of A]B.

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
 
12 −6 3
AB = .
−4 12 14

The 3rd column of AB is


      
1 3 0 1 3
A = = .
3 −1 5 3 14

The 2nd row of AB is


 
    4 −2 1  
−1 5 B = −1 5 = −4 12 14 .
0 2 3

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


If wepartition B in terms of its column vectors:
B = b1 b2 · · · br , then
 
AB = A b1 b2 · · · br
 
= Ab1 Ab2 · · · Abr

Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
       
4 −2 1
AB = A A A
0 2 3
       
12 −6 3
=
−4 12 14
 
12 −6 3
= .
−4 12 14

Dr K Matrices and matrix operations


 
a1
 a2 
If we partition A in terms of its row vectors, A =  .  then
 
 .. 
   
a1 a1 B am
 a2   a2 B 
AB =  .  B =  . 
   
.
 .  .
 . 
am am B
Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
   
3 0 B
AB = 
−1 5 B
   
12 −6 3 
= 
−4 12 14
 
12 −6 3
= .
−4 12 14
Dr K Matrices and matrix operations
 
a1
 a2 
If we partition A in terms of its row vectors, A =  .  then
 
 .. 
   
a1 a1 B am
 a2   a2 B 
AB =  .  B =  . 
   
.
 .  .
 . 
am am B
Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
   
3 0 B
AB = 
−1 5 B
   
12 −6 3 
= 
−4 12 14
 
12 −6 3
= .
−4 12 14
Dr K Matrices and matrix operations
 
a1
 a2 
If we partition A in terms of its row vectors, A =  .  then
 
 .. 
   
a1 a1 B am
 a2   a2 B 
AB =  .  B =  . 
   
.
 .  .
 . 
am am B
Example
   
3 0 4 −2 1
Let A = and B = .
−1 5 0 2 3
   
3 0 B
AB = 
−1 5 B
   
12 −6 3 
= 
−4 12 14
 
12 −6 3
= .
−4 12 14
Dr K Matrices and matrix operations
Matrix Products as Linear Combinations

If A1 , A2 , . . . , Ar are matrices of the same size, and if


c1 , c2 , . . . , cr are scalars, then

c1 A1 + c2 A2 + . . . + cr Ar

is called a linear combination of A1 , A2 , . . . , Ar .


Example
     
1 1 −1 1 5 −1
2 −3 =
−1 2 −1 5 1 −11
   
5 −1 1 1
Expresses as a linear combination of and
1 −11 −1 2
 
−1 1
.
−1 5

Dr K Matrices and matrix operations


Matrix Products as Linear Combinations

If A1 , A2 , . . . , Ar are matrices of the same size, and if


c1 , c2 , . . . , cr are scalars, then

c1 A1 + c2 A2 + . . . + cr Ar

is called a linear combination of A1 , A2 , . . . , Ar .


Example
     
1 1 −1 1 5 −1
2 −3 =
−1 2 −1 5 1 −11
   
5 −1 1 1
Expresses as a linear combination of and
1 −11 −1 2
 
−1 1
.
−1 5

Dr K Matrices and matrix operations


Theorem
If A is an m × n matrix and if x is an n × 1 column vector, then
Ax can be expressed as a linear combination of the columns of
A in which the coefficients are the entries of x.

Example
  
a11 a12 ... a1n x1
 a21 a22 ... a2n   x2 
Ax =  .
  
.. .. ..   .. 
 .. . . .  . 
am1 am2 . . . amn xn
     
a11 a12 a1n
 a21   a22   a2n 
= x1  .  + x2  .  + . . . + xn  . 
     
.
 .  .
 .  .
 . 
am1 am2 amn

Dr K Matrices and matrix operations


We can write the columns of AB as a linear combination of the
columns of A:
Example
   
3 0 4 −2 1
Let A = and B = . Then
−1 5 0 2 3
 
AB = Ab1 Ab2 Ab3

where       
3 0 4 3 0
Ab1 = =4 +0
−1 5 0 −1 −5
      
3 0 −2 3 0
Ab2 = = −2 +2
−1 5 2 −1 −5
      
3 0 1 3 0
Ab3 = =1 +3
−1 5 3 −1 −5

Dr K Matrices and matrix operations


Matrix Form of a Linear System
a11 x1 + a12 x2 + ··· + a1n xn = b1
a21 x1 + a22 x2 + ··· + a2n xn = b2
.. .. .. ..
. . ··· . .
am1 x1 + am2 x2 + ··· + amn xn = bm
can be abbreviated to the augmented matrix

a11 a12 · · · a1n x1 b1


    
 a21 a22 · · · a2n  x2  b2 
..   ..  =  .. 

 . ..
   
 .. . ··· .  .   . 
am1 am2 · · · amn xn bn
or
Ax = b
or
a11 a12 ··· a1n b1
 
 a21 a22 ··· a2n b2 
[A|b] = 

.. .. .. ..


 . . ··· . . 
am1 am2 ··· amn bm

Dr K Matrices and matrix operations


In conclusion: Do you know these concepts?

Linear Equation
Consistent linear system
Homogenous linear
Inconsistent linear
equation
system
System of linear
Augmented matrix
equation
Elementary row
Solution of a linear
operations
system

Dr K Matrices and matrix operations


Can you?
Determine the size of a given matrix.
Identify the row vectors and column vectors of a given
matrix.
Perform the arithmetic operations of matrix addition,
subtraction, scalar multiplication, and multiplication.
Determine whether the product of two given matrices is
defined
Compute matrix product using row-column method, the
column method, and the row method.
Express the product of matrix and a column vector as a
linear combination of the columns of the matrix.
Express a linear system as a matrix equation, and identify
the coefficient matrix.
Compute the transpose of a matrix
Compute the trace of a square matrix
Dr K Matrices and matrix operations
Extra Exercises
Example
1 Find a matrix A such that
   
1 3 2 0 −1 1
A =
0 −1 1 2 6 4

2 Find a matrix B such that


   
1 3 2 3 4
B=
0 −1 1 −1 0
   
−3 −2 1 2
3 Express as a linear combination of and
  −1 0 3 4
5 6
.
7 8
4 A square matrix A is said to be symmetric if AT = A. Prove that
A + AT is symmetric for any square matrix A.

Dr K Matrices and matrix operations

You might also like