Session 1 2023
Session 1 2023
A Review of Linear
Algebra
Session Overview
This session looks at matrices and systems of linear equations. Matrices allow for elegant
representation and solution of complex mathematical equations. Though matrices have
many properties similar to that seen in normal algebra, there are some properties that
are quite different and worth paying attention to. Knowing these properties, it is then
easier to formulate large problems with matrices for easier solution.
Slide 3
Session Outline
Slide 4
MATRIX ALGEBRA
Definition
A matrix is any rectangular array of numbers.
For example, the following are all matrices:
2 4 3
2 4 5 4 6 2 4
4 6 ; ;
6. 1 8
Row
2 4 3
5 4 6
6 1 8
Column
Slide 5
MATRIX ALGEBRA
Definition
If a matrix A has m rows and n columns, we call A an m x n matrix.
We refer to m x n as the order of the matrix. In general, a typical m x n
matrix A may be written as
Slide 6
MATRIX ALGEBRA
Example
2 4 3 A 3x3 matrix
5 4 6 𝑎!! = 8
6 1 8
Slide 7
MATRIX ALGEBRA
Definition
A vector, v, of dimension n is an n × 1 matrix rectangular array of elements
é v1 ù
êv ú
v= ê 2ú
êú
ê ú
ë vn û
A vector of the form v is a column vector. (the transpose of a
column vector is a row vector)
Slide 8
MATRIX ALGEBRA
1 1
u=
2
v= w = -1
-3 -2
Slide 9
MATRIX ALGEBRA
Scalar Multiplication
Let A = (aij) denote an m × n matrix and let c be any scalar. Then cA is
the matrix:
é ca11 ca12 ca1n ù
ê ca ca22 ca2 n úú
cA = ( caij ) = ê 21
ê ú
ê ú
ëcam1 cam 2 camn û
Example
2 4 3 6 12 9
A= 5 4 6 3A = 15 12 18
6 1 8 18 3 24
Slide 10
MATRIX ALGEBRA
Addition
Let A = (aij) and B = (bij) denote two m × n matrices. Then the
sum, A + B, is the matrix:
é a11 + b11 a12 + b12 a1n + b1n ù
êa +b a22 + b22 a2 n + b2 n úú
A + B = ( aij + bij ) = ê 21 21
ê ú
ê ú
ë am1 + bm1 am 2 + bm 2 amn + bmn û
Matrix multiplication
For two matrices A and B, the matrix AB is only possible if the number
of columns of A equals the number of rows of B
Let A = (aij) denote an n × m matrix and B = (bjl) denote an m × k
matrix. Then the n × k matrix C = (cil) where
m
cil = å aij b jl
j =1
is called the product of A and B and is denoted by
A∙B
Slide 12
MATRIX ALGEBRA
Example
2 4 3 1 2 2
A= 5 4 6 B= 4 2 3
6 1 8 2 3 1
24 21 19
A∙B = 33 36 28
26 38 23
Slide 13
MATRIX ALGEBRA
Transpose of a matrix
Given any m x n matrix
é a11 a12 a1n ù
êa a22 a2 n ú
A = ( aij ) = ê 21 ú
ê ú
ê ú
ë am1 am 2 amn û
Transpose of a matrix
Given the 4 x 3 matrix
2 4 3
A= 5 4 6
6 1 8
4 5 7
2 5 6 4
AT = 4 4 1 5
3 6 8 7
Slide 15
MATRIX ALGEBRA
Inverse of an n × n matrix
Let A denote the n × n matrix
é a11 a12 a1n ù
êa a22 a2 n ú
A = ( aij ) = ê 21 ú
ê ú
ê ú
ë an1 an 2 ann û
Slide 18
MATRIX ALGEBRA
Rank of an m × n matrix
Let A denote an m × n matrix
é a11 a12 a1n ù
êa a22 a2 n ú
A = ( aij ) = ê 21 ú
ê ú
ê ú
ë am1 am 2 amn û
The maximum number of linearly independent rows in a matrix A is called the row rank of A,
and the maximum number of linearly independent columns in A is called the column rank of A
Row rank of A ≤ m, and column rank of A ≤ n
If A is an m by n matrix, that is, if A has m rows and n columns, then Rank of A ≤
min(m,n)
Slide 19
BASIC PROPERTIES OF MATRICES
Slide 20
BASIC PROPERTIES OF MATRICES
• Multiplication Properties
– Associative Property: A(BC) = (AB)C
– Multiplicative identity: AI = IA = A
– Multiplicative inverse:
• Suppose A is a regular matrix, and I is an identity matrix. If there exist a matrix
B such that AB = I, then B is the inverse of A. The inverse of A is usually
denoted by the matrix A-1.
• If A is a square matrix and A-1 exists, then AA-1 = A-1A = I
• Combined Properties
– Left distributive: A(B + C) = AB + AC
– Right distributive: (B + C)A = BA + CA
Slide 21
BASIC PROPERTIES OF MATRICES
• Equality
– Addition: If A = B, then A + C = B + C
– Left multiplication: If A = B, then CA = CB
– Right multiplication: If A = B, then AC = BC
The use of these properties is best illustrated by an example of solving a
matrix equation.
Example: Given an n x n matrix A and an n x p matrix B and a third
matrix denoted by X, we will solve the matrix equation AX = B for X.
A-1 AX = A-1 B ⇒ IX = A-1 B ⇒ X = A-1 B
Slide 22
BASIC PROPERTIES OF MATRICES
Example:
Your mobile phone provider Django Mobile charges Ghc0.07 per minute of
talk, Ghc 0.005 per text and Ghc0.02 per minute of internet usage. If your
monthly total phone bill is 𝑇, formulate a linear equation to represent your
monthly mobile charge.
Solution
Let 𝑥! , 𝑥" , 𝑥# be the amount of talk, text and internet usage in a month.
0.07𝑥! + 0.005𝑥" + 0.02𝑥# = 𝑇
Slide 25
Systems of Linear Equations and Matrices
Example:
A household has Ghc 400 to spend on rice, soda drinks and soap, and Ghc 40 to spend on
transporting them to the house. A bag of rice sells for Ghc 20 and cost Ghc 1 to transport,
a pack of soda drink sells for Ghc 15 and cost Ghc 2 to transport, and a box of soap sells
for Ghc 10 and cost Ghc 1 to transport. If the household should buy exactly 5 bars of
soap, write a relation detailing how the available money is spent on the items. Assume it
must spend all the Ghc 400 and Ghc 40 on shopping and transportation respectively.
Solution:
Let x1, x2, and x3 be the number of bags of rice, packs of soda drinks, and bar of
soap bought. Then,
20x1+15x2+10x3 = 400
x1 + 2x2 + x3 = 40
x3 = 5
Slide 27
Systems of Linear Equations and Matrices
Example:
Copico farm company owns 50 acres of land that is reserved for growing wheat and corn.
3 workers and 2 tons of fertilizer are always needed to grow an acre of wheat, where as
an acre of corn requires 2 workers and 4 tons of fertilizer. If Copico has available 100
workers and 120 ton of fertilizer available, how many acres of wheat and corn should be
grown that best utilize Copico’s resources? Assume Copico utilizes all of its resources.
What is the decision to be made?; What are Copico’s resources?
How much of each resource is available?
Solution
Let 𝑥" , 𝑥# be the acres of land allocated to wheat and corn respectively.
𝑥" + 𝑥# = 50
3𝑥" + 2𝑥# = 100
2𝑥" + 4𝑥# = 120
Slide 28
Systems of Linear Equations and Matrices
Example:
An oil company manufactures three types of gasoline: premium unleaded, regular
unleaded, and regular leaded by mixing three types of crude oil: crude oil 1, 2, and 3.
The number of gallons of crude oil required to manufacture 1 gallon of gasoline is given
in the table below.
Gallons of crude oil required to produce 1 gallon of gasoline
Premium Regular leaded Regular Unleaded
Crude Oil 1 3 1 1
Crude Oil 2 1 1 1
Crude Oil 3 4 3 1
If the company has available 40, 30, and 60 gallons of crude oil 1, 2, and 3
respectively, write a relation to show how the available crude oil are used for the
production of the three types of gasoline . Assume all available crude oil must be
utilized.
Slide 29
Systems of Linear Equations and Matrices
Solution
Let x1, x2, and x3 be the gallons of gasoline type 1, 2, and 3 resp. Then,
3x1 + x2 + x3 = 40
x1 + x2 + x3 = 30
4x1 + 3x2 + x3 = 60
Slide 30
Systems of Linear Equations and Matrices
A X B
Slide 31
Systems of Linear Equations and Matrices
Example:
3x1 + x2 + x3 = 40 3 1 1 x1 40
x1 + x2 + x3 = 30 1 1 1 x2 = 30
4 3 1 x3 60
4 x1 +3x2 + x3 = 60
A X B
Slide 32
Reference
Winston, W.L. & Goldberg, J.B. (2004). Operations Research: Applications and
Algorithms. 4th Edition, Cengage Learning, Belmont.