Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 43

Lecture 6

Business Mathematics and


Statistics

Dr. Muhammad Arif Hussain


Today’s Topics

• Inverse of Matrices
• Gauss Elimination Rule

• Assignment 2
Matrix Algebra
Assignment 2
Solve the following by Gauss method.

Ex. No. 9.5 Qs.9, 10,11,12


Cramer’s Rule
• Cramer’s rule states that the system
a1x + b1y = c1
• a2x + b2y = c2
• has a solution

provided that
a1b2 – a2b1 is NOT equal to 0.
Cramer’s Rule
• Each numerator and denominator in this
solution can be expressed as a determinant, as
follows.
Cramer’s Rule
Cramer’s Rule - 3 x 3

• Consider the 3 equation system below with


variables x, y and z:

a1 x  b1 y  c1z  C1
a2 x  b2 y  c2 z  C2
a3 x  b3 y  c3 z  C3
Cramer’s Rule - 3 x 3

• The formulae for the values of x, y and z are shown


below. Notice that all three have the same denominator.

C1 b1 c1 a1 C1 c1 a1 b1 C1
C2 b2 c2 a2 C2 c2 a2 b2 C2
C 3 b3 c3 a 3 C 3 c3 a3 b3 C3
x y z
a1 b1 c1 a1 b1 c1 a1 b1 c1
a2 b2 c2 a2 b2 c2 a2 b2 c2
a3 b3 c3 a3 b3 c3 a3 b3 c3
Cramer’s Rule
• Example: 3x - 2y + z = 9
Solve the system x + 2y - 2z = -5
x + y - 4z = -2

9 2 1 3 9 1
5 2 2 1 5 2
2 1 4 23 1 2 4 69
x  1 y   3
3 2 1 23 3 2 1 23
1 2 2 1 2 2
1 1 4 1 1 4
Cramer’s Rule

3x - 2y + z = 9
x + 2y - 2z = -5
x + y - 4z = -2

3 2 9
1 2 5
1 1 2 0 The solution is
z  0
3 2 1 23
1 2 2
(1, -3, 0)
1 1 4
Types of Matrix
• Identity
Symmetricmatrices - I

1 0 0 0 a b c 
b d e 
1 0 0 1 0 0 c e f 
0 1 
  0 0 1 0  
0 0 0 1 

– Diagonal matrices are (of course) symmetric
• Diagonal
– Identity matrices are (of course) diagonal
1 0 0 0
0 2 0 0
0 0 1 0 
0 0 0  4 

Gauss-Jordan elimination Method

The system 2 x  4 y  6 z  22
3x  8 y  5z  27
 x  y  2z  2
may be represented by the augmented matrix

Coefficient
Matrix

 2 4 6 22 
 
 3 8 5 27 
 1 1 2 2 
Row Operations
1. Interchange any two rows.
2. Replace any row by a nonzero constant
multiple of itself.
3. Replace any row by the sum of that row
and a constant multiple of any other row.
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

 3 2 8 9
Solution  
 2 2 1 3 R1  R2
 1 2 3 8 
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

 1 0 9 12 
Solution   R2  2 R1
 2 2 1 3  RR1  RR2
 1 2 3 8  3 1
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 9 12 
Solution  R 2  2 R1
0 2 19 27  R2  R3
R3  R1
0 2 12 
4 
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 9 12 
Solution  1
0 2 12 4  2 R2
0 2 19 27  R  R
2 3
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 9 12 
Solution   1
0 1 6 2  2 R2
0 2 19 27  R3  R2
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 9 12 
Solution  
0 1 6 2  R3  R2
31  31 R3
1
0 0 31 
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 9 12  R1  9 R3
Solution  
0 1 6 2  R2  6 R3
0 0 1 1 311 R3
Example
• Use the Gauss-Jordan elimination method to
solve the system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

1 0 0 3 R1  9 R3
Solution  
0 1 0 4 R2  6 R3
0 0 1 1 
Example
• Use the Gauss-Jordan elimination method to solve the
system of equations
3x  2 y  8 z  9
2 x  2 y  z  3
x  2 y  3z  8

Solution
1 0 0 3
 
0 1 0 4
0 0 1 1 

• The solution to the system is thus x = 3, y = 4, and z = 1.


An Infinite Number of Solutions
• Solve the system of equations given by
x  2 y  3 z  2
3x  y  2 z  1
2 x  3 y  5 z  3

Solution  1 2 3 2 
  R2  3R1
 3  1 2 1
R3  2 R1
 2 3 5 3
An Infinite Number of Solutions
• Solve the system of equations given by
x  2 y  3 z  2
3x  y  2 z  1
2 x  3 y  5 z  3

 1 2 3 2  R2  3R1
Solution   1
0 7 7 7   7 R2
0 1 1 1 R3  2 R1
An Infinite Number of Solutions
• Solve the system of equations given by
x  2 y  3 z  2
3x  y  2 z  1
2 x  3 y  5 z  3

 1 2 3 2  R1  2 R2
Solution   1R
0 1 1 1 7 2
0 1 1 1 R3  R2
An Infinite Number of Solutions
• Solve the system of equations given by
x  2 y  3 z  2
3x  y  2 z  1
2 x  3 y  5 z  3

Solution  1 0 1 0 R  2 R
  1 2

0 1 1 1
0 0 0 0 R3  R2
An Infinite Number of Solutions
• Solve the system of equations given by
x  2 y  3 z  2
3x  y  2 z  1
2 x  3 y  5 z  3

Solution
 1 0 1 0
 
0 1 1 1
0 0 0 0

• Observe that row three reads 0 = 0, which is true but


of no use to us.
A System of Equations That Has No
Solution
• Solve the system of equations given by
x y z 1
3x  y  z  4
x  5 y  5 z  1

1 1 1 1
Solution   R2  3R1
 3 1 1 4
R3  R1
 1 5 5 
1
A System of Equations That Has No
Solution
• Solve the system of equations given by
x y z 1
3x  y  z  4
x  5 y  5 z  1

1 1 1 1 R2  3R1
Solution   R R
0 4 4 1 3 2

0 4 4 2  R3  R1
A System of Equations That Has No
Solution
• Solve the system of equations given by
x y z 1
3x  y  z  4
x  5 y  5 z  1

Solution 1 1 1 1
  R R
0 4 4 1 3 2

0 0 0 1
A System of Equations That Has No
Solution
• Solve the system of equations given by
x y z 1
3x  y  z  4
x  5 y  5 z  1
Solution
1 1 1 1
 
0 4 4 1
0 0 0 1

• Observe that row three reads 0x + 0y + 0z = –1 or 0 = –1!


• We therefore conclude the system is inconsistent and has no
solution.
Inverse of a Matrix
EXAMPLE Inverse of a 2 × 2 Matrix by Determinants

3 1 11  4 1  0.4 0.1


A  , A   
2 4 10  2 3   0.2 0.3 

Determination of the Inverse
by the Gauss–Jordan Method
EXAMPLE Finding the Inverse of a Matrix
by Gauss–Jordan Elimination

Determine the inverse A−1 of


 1 1 2 
A   3 1 1  .
 1 3 4 
EXAMPLE (continued) Finding the Inverse
of a Matrix by Gauss–Jordan Elimination
Solution.
We apply the Gauss elimination (Sec. 7.3) to the following
n × 2n = 3 × 6 matrix, where BLUE always refers to the
previous matrix.
 1 1 2 1 0 0 
 
 A I    3 1 1 0 1 0 
 1 3 4 0 0 1 
 1 1 2 1 0 0 
  0 2 7 3 1 0  Row 2  3 Row 1
 0 2 2 1 0 1  Row 3  Row 1
EXAMPLE (continued) Finding the Inverse
of a Matrix by Gauss–Jordan Elimination
Solution. (continued 1)

 1 1 2 1 0 0 
  0 2 7 3 1 0 
 0 0 5 4 1 1  Row 3  Row 2
EXAMPLE (continued) Finding the Inverse
of a Matrix by Gauss–Jordan Elimination
Solution. (continued 2)
This is [U H] as produced by the Gauss elimination. Now
follow the additional Gauss–Jordan steps, reducing U to I,
that is, to diagonal form with entries 1 on the main
diagonal.

 1 1 2 1 0 0   Row 1
 0 1 3.5 1.5 0.5 0  0.5 Row 2
0 0 1 0.8 0.2 0.2  0.2 Row 3
EXAMPLE (continued) Finding the Inverse
of a Matrix by Gauss–Jordan Elimination
Solution. (continued 3)
1 1 0 0.6 0.4 0.4  Row 1  2 Row 3
 0 1 0 1.3 0.2 0.7  Row 2  3.5 Row 3
0 0 1 0.8 0.2 0.2 
1 0 0 0.7 0.2 0.3  Row 1  Row 2
 0 1 0 1.3 0.2 0.7 
0 0 1 0.8 0.2 0.2 
EXAMPLE (continued) Verification

Solution. (continued )
The last three columns constitute A−1. Check:
 1 1 2   0.7 0.2 0.3   1 0 0 
 3 1 1   1.3 0.2 0.7   0 1 0  .
    
 1 3 4   0.8 0.2 0.2  0 0 1 

Hence AA−1 = I. Similarly A−1A = I.


Mini-Project
Submit by Nov 03, 2019

Total marks = 15 = 7 (report) + 8 (presentation)

n = your serial number in attendance sheet

Final marks will be decided after the


presentation given by each student.
 
Mini-Project
                                        
Open code

Q1. Obtain derivative of f(x) = n* x^n up to fifth order.


Where n = your serial number in attendance sheet

Q2. Obtain results of Q1using computer program.

Q3. Obtain integral of f(x) = n* x^n


Manually and using computer program.
Q4. Find inverse of

Q5. Obtain results of Q4 using computer program.


Mini-Project

Q6. A firm determines that x units of its product can be sold daily
at p dollars per unit, where .x  1000  p The cost of producing x units per
day is C ( x )  3000  20 x . Find the revenue and profit functions.
Assuming that the production capacity is at most 500 units per day,
determine how many units the company must produce and sell each
day to maximize profit.
Find the maximum profit. What price per unit should be charged
to obtain maximum profit?.

Q7. Solve the system of equations Qs. 1, 2, 3 of Ex: 3.2


manually and using computer application.

Q8. Prepare a report to explain the results of Q1 and Q7.

You might also like