0% found this document useful (0 votes)
22 views43 pages

04 - Matrices (III) and LP

The document covers the concepts of inverse matrices and their application in solving linear systems, detailing the steps to find the inverse and use it to solve equations. It also discusses linear inequalities and linear programming, explaining how to graph inequalities, find feasible regions, and optimize linear functions under constraints. Additionally, the document introduces the Simplex method for solving linear programming problems with multiple variables.

Uploaded by

Azad Rahim
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)
22 views43 pages

04 - Matrices (III) and LP

The document covers the concepts of inverse matrices and their application in solving linear systems, detailing the steps to find the inverse and use it to solve equations. It also discusses linear inequalities and linear programming, explaining how to graph inequalities, find feasible regions, and optimize linear functions under constraints. Additionally, the document introduces the Simplex method for solving linear programming problems with multiple variables.

Uploaded by

Azad Rahim
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/ 43

Matrices

Learning
Objective
Solve linear system using
inverse matrix
Inverse Matrices
If the product 𝐴 and 𝐵 is the identity matrix, it is said
that 𝐵 is the inverse of 𝐴 (and 𝐴 is the inverse of 𝐵).
The matrix 𝐵 is called the inverse matrix of 𝐴,
denoted 𝐴#$

3
Inverse Matrices
Is 𝐵 the inverse of 𝐴 if 𝐴 = 1 2 and 𝐵 = −1 2
?
1 1 1 −1

1 2 −1 2 1 0
𝐴𝐵 = = =𝐼
1 1 1 −1 0 1
−1 2 1 2 1 0
𝐵𝐴 = = =𝐼
1 −1 1 1 0 1

Thus, 𝐵 is the inverse of 𝐴, or 𝐵 = 𝐴#$ . We also say


𝐴 is the inverse of 𝐵, or 𝐴 = 𝐵#$

Note that 𝐴#$ #$


=𝐴
4
Inverse Matrices

However, calculating determinant for larger


matrices can be computationally intensive and
involves large number of calculations.
Hence, we can use the inverse matrices method
instead.

5
Inverse Matrices

Let’s say you have a systems of equation in the form


𝐴𝑋 = 𝐶
where 𝐴 is the coefficient matrix, 𝑋 is the column
vector of variables, and 𝐶 is the column vector of
constants
𝑋 = 𝐴#$ . 𝐶
Hence, you can solve the system of equation by
multiplying the inverse of matrix 𝐴 by matrix 𝐶 to
find the solution of 𝑋
6
Inverse Matrices
① Form augmented matrix 𝐴|𝐼
② Perform row operations until it has been
augmented to the form 𝐼 |𝐵
③ The matrix 𝐵 is the inverse of matrix 𝐴
④ Multiply matrix 𝐵 with the constant matrix (𝐶) to
find the solution

Note: If you CANNOT get the form of 𝑰|𝑩 , it means


that matrix A does not have an inverse, hence you
CANNOT use the inverse matrices method to solve
this system of equations. 7
1 Inverse Matrices
2𝑥 − 𝑦 − 2𝑧 = 2
13𝑥 − 𝑦 + 𝑧 = −3
𝑥+𝑦−𝑧 =7
Form augmented matrix 𝐴|𝐼

8
2 Inverse Matrices
Perform row operaYons unYl it has been augmented
to the form 𝐼 |𝐵

9
3 Inverse Matrices
The matrix 𝐵 is the inverse of matrix 𝐴

0 1/4 1/4
𝐴#$ = −1/3 0 2/3
−1/3 1/4 −1/12

10
4 Inverse Matrices
MulYply matrix 𝐵/𝐴#$ with the constant matrix (𝐶)
to find the soluYon

0 1/4 1/4 2
𝑋 = −1/3 0 2/3 −3
−1/3 1/4 −1/12 7

11
Matrices
• Understand the concept
of matrix

• Perform matrix operations

• Express a system as a
single matrix equation

• Solve systems of linear


equations with unique
solutions and with
nonunique solutions

• Solve linear system using


inverse matrix
Inequalities
and Linear
Programming
Learning
Objective
Graph and solve systems of
linear inequalities in two
variables
Use graphical methods to find
optimal value of a linear function
subject to constraints
Linear Inequalities in Two Variables
Linear inequality can be written in one of the following
forms
𝑎𝑥 + 𝑏𝑦 + 𝑐 < 0 𝑎𝑥 + 𝑏𝑦 + 𝑐 ≤ 0
𝑎𝑥 + 𝑏𝑦 + 𝑐 > 0 𝑎𝑥 + 𝑏𝑦 + 𝑐 ≥ 0
where
𝑎, 𝑏, and 𝑐 are constants
not both 𝑎 and 𝑏 are zero

When graphing,
• a solid line – included in the solution (≤, ≥)
• a dashed line – not included in the solution (<, >)
15
Linear Inequalities in Two Variables
The graph of 𝑦 < 𝑥 consists of all points
in which the 𝑦-coordinate is less than the
𝑥-coordinate

1) Graph the line 𝑦 = 𝑥


This line separates the 𝑥𝑦-plane into
two half-planes, 𝑦 < 𝑥 and 𝑦 > 𝑥.

2) Determine which half-plane is the


solution region by selecting as a test
point any point not on the line; e.g.
(2, 0)

16
System of Linear Inequalities
If we have two or more inequalities in two variables,
we can find the solutions that satisfy all the
inequalities. We call the inequalities a system of
inequalities, and the solution of the system can be
found by finding the intersection of the solution sets
of all the inequalities.

The solution set of the system of inequalities can be


found by graphing the inequalities on the same set of
axes and noting their point of intersection

17
Steps in Solving SLI
① Rearrange the inequality, so that the appropriate
plane is obvious
② Plot the graph
③ Determine the region

18
Example: System of Linear Inequalities
3𝑥 − 2𝑦 < 6
Graph the solution to the inequalities D
𝑥 − 3𝑦 > 9

19
Linear Programming
Linear programming is used to find the optimal value of a
linear function subject to constraints.
e.g. A manufacturer may want to maximise a profit, subject to
production restrictions imposed by limitations on the use of
machinery and labour.
If the limitations on the variables (called constraints) can be
expressed as linear inequalities and the function that is to be
maximised or minimised (called the objective function) is a
linear function, then the problem is called a linear
programming problem.
Hence, any point in the region determined by the constraints
is called a feasible solution, and the region itself is called the
feasible region. 21
Feasible Region
The feasible region is an example of
a closed and bounded region
because it is entirely enclosed by,
and includes, the lines associated
with the constraints. The objective
function occurs at one of the corner
of the region

The feasible region is an example of


an unbounded region because it is
not enclosed by all the constraints.
In such a case, objective function is
either only a maximum or a
minimum, or no solution 22
Solving Linear Programming
① When the feasible region for a linear programming problem
is closed and bounded, the objective function has a
maximum and a minimum value

② When the feasible region is not closed and bounded, the


objective function may have a maximum only, or a minimum
only, or no solution

③ If a linear programming problem has a solution, then the


optimal (maximum or minimum) value of an objective
function occurs at a corner of the feasible region
determined by the constraints.

④ If the objective function has its optimal value at two


corners, then it also has that optimal value at any point on
the line (boundary) connecting those two corners. 23
Steps in Solving Linear Programming

① Write down the objective function and constraint


inequalities
② Graph the solution of the constraint system
③ Find the corners of the feasible region
④ Evaluate objective function at each corner of the
feasible region

24
Example: Linear Programming
A company produces 2 types of can openers: manual and electric.
Each requires the use of 3 machines: A, B and C. Each manual can
opener requires the use of machine A for 2 hrs, machine B for 1 hr,
and machine C for 1 hr. An electric can opener requires 1 hr on A, 2
hrs on B and 1 hr on C. Suppose the maximum number of hours
available per month for the use of machines A, B and C are 180, 160
and 100 respectively. The profit on manual can opener is $4, and on
an electric can opener is $6. If the company can sell all the can
openers, how many of each type should it make in order to maximise
the monthly profit?

25
28
The Simplex Method
• Useful if there are more than 2 variables

• Systematic way of moving from one feasible corner


of the convex region to another in such a way that
the value of the objective function increases until
an optimal value is reached or it is discovered that
no solution exists

29
Simplex: Maximisation Problems
Standard maximisation problems, satisfy the
following conditions:
1. The objective function is to be maximised
2. All variables are nonnegative
3. The constraints are of the form
𝑎$𝑥$ + 𝑎G𝑥G + ⋯ + 𝑎I 𝑥I ≤ 𝑏
where 𝑏 > 0

These conditions may seem to restrict types of problems


unduly, but in applied situations where the objective function
is to be maximised, the constraints often satisfy conditions 2
and 3.
30
Simplex Method

§ The simplex method uses matrix method on systems of


equations
§ Convert each constraint inequality to an equation by
using a new variable, called a slack variable
§ Each slack variable represents the amount of the
constraint left unused

Let 𝑥 + 𝑦 ≤ 6000, thus this can be rewritten as


𝑥 + 𝑦 + 𝑠$ = 6000
and 𝑠$ represent the unused amount in the equation
31
Steps in Solving LP using Simplex
① Rewrite each constraint of inequality using different
slack variable
② Set up the simplex matrix.
③Find the pivot entry – a) pivot column: the most –ve
number in the last row; b) pivot entry: +ve coefficient
that gives the smallest non-negative quotient

④Pivot using row operations

⑤Anymore negative indicator? Yes, return to ③

⑥Read the values of the basic variables and the objective


function from the rows of the matrix 32
Example: Solving using Simplex
Maximise 𝑍 = 5𝑥$ + 4𝑥G subject to
𝑥$ + 𝑥G ≤ 20
2𝑥$ + 𝑥G ≤ 35
−3𝑥$ + 𝑥G ≤ 12
𝑥$ , 𝑥G ≥ 0

33
Solutions of Simplex Method

§ Unique solution
§ Multiple solution (when nonbasic variable has a zero
indicator in its column)

37
Simplex: Multiple Solutions
Task 𝐵: Determine necessary operations and implementing
those operations to reach a solution

1 #NOPNQ→NQ
GNOPNS→NS

The simplex matrix has no negative indicators, so the


optimal value of 𝑓 has been found.

Task 𝐶 : Reading the solution from the simplex matrix


𝑓 = 32 when 𝑥 = 16, 𝑦 = 0
Note that the nonbasic variables (𝑦) has a zero indicator
38
Simplex Method: No Solution cont’d

3 ÷ −3 = −1
#GNOPNQ→NQ
TNOPNS→NS 0÷0=0

If, after the pivot column has been found, there are no
positive coefficients in that column, no maximum
solution exists.

Even if we could pivot using the 𝑥G column, the variables


𝑥$ and 𝑠$ would remain equal to 0. As 𝑥G increases, 𝑥T
also increases and the value of 𝑓 also increases. That is,
there is no maximum value for 𝑓.
39
Example: Solving using Simplex
T
Maximize 𝑍 = 3𝑥$ + 4𝑥G + 𝑥
G T
subject to
−𝑥$ − 2𝑥G ≥ −10
2𝑥$ + 2𝑥G + 𝑥T ≤ 10
𝑥$ , 𝑥G , 𝑥T ≥ 0

40
43

You might also like