Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENM 503 Block 2 Lesson 7 – Matrix Methods

Similar presentations


Presentation on theme: "ENM 503 Block 2 Lesson 7 – Matrix Methods"— Presentation transcript:

1 ENM 503 Block 2 Lesson 7 – Matrix Methods
Everything you would want to know about The Matrix and then some… this way Narrator: Charles Ebeling

2 These only begin to show the potential of the matrix.
Applications Solving systems of linear equations Regression analysis Markov processes Linear programming Nonlinear optimization Queuing Reliability Inventory – MRP systems These only begin to show the potential of the matrix.

3 Matrix and Vectors A matrix is a rectangular array of elements which are operated on as a single object. The elements are often numbers but could be any mathematical object provided that it can be added and multiplied with acceptable properties. Vectors are strongly related to matrices, they can be considered as a matrix having only a single row (row vector) or a single column (column vector).

4 Examples X is a 1 x 4 row vector, Y is a 3 x 1 column vector
A is a 3 x 3 matrix, and B is a 3 x 2 matrix

5 An m x n Matrix

6 Vector Matrix Operations
Vectors and matrices can be added (or subtracted) and multiplied when their dimensions are in agreement. To add or subtract two vectors or two matrices having the same dimensions, just add their corresponding elements A ± B = {aij ± bij} To multiply two vectors, multiply corresponding elements and add. The result is a scalar (dot product). Both vectors must have the same number of elements.

7 Vector Example

8 Example Matrix Addition and scalar multiplication

9 Matrix Multiplication
If A is an m x n matrix and B is an n x p matrix, then C = A x B is an m x p matrix where The i,j element of C is found by multiplying the ith row of A times the jth column of B (equivalent to a vector multiplication).

10 Example Matrix Multiplication

11 Properties of Matrix Operations
A (BC) = (AB) C A (B+C) = AB + AC (B+C) A = BA + CA however A B  B A (both are defined only if A and Bare n x n matrices) and A A = A2 (only if a square matrix, i.e dimension n x n)

12 An interesting sidelight
A · B = 0 does not necessarily imply that A = 0 or B = 0 For example: Yes, that is really interesting.

13 The Transpose If A = {ajk} then At = {akj}
Each row of A becomes a column of At If A = At, then A is a symmetric matrix; i.e. aij = aji

14 Properties of the Transpose
(At)t = A (A + B)t = At + Bt (kA)t = k At (AB)t = Bt At Quick student exercise: Create an example to illustrate each property Quick student exercise: Show that AtA is symmetric using the above properties

15 Some Special Matrices The Identity Matrix (n x n) The Null Matrix

16 More Special Matrices Upper triangular Lower Triangular all zeros
Now ain’t that special!

17 The Diagonal Matrix main diagonal

18 The Determinant For a square (n x n) matrix A, the determinant is defined as a scalar computed from the sum of n! terms of the form (  a1i a2j … anr) ; the sign alternating and depending upon the permutation.

19 A 2 x 2 Determinant

20 A 3 x 3 determinant + -

21 Properties of Determinants
1. |A| = |At| 2. If ajk = 0 for all k or for all j, |A| = 0 3. Interchange any 2 rows, A’: |A| = - |A’| 4. For scalar k, |kA| = k |A| 5. If there are 2 identical rows or columns, |A| = 0 6. |AB| = |A| |B| 7. If A is triangular, Quick student exercise: Create an example to illustrate each property

22 Cofactors Minor – determinant of order (n-1) obtained by removing the jth row and kth column of A Cofactor: (-1)j+k Minorjk = Ajk Cofactor matrix - A matrix with elements that are the cofactors, term-by-term, of a given square matrix – [Ajk] Adjoint Matrix = transpose of the cofactor matrix – [Ajk]t

23 Example Cofactor Matrix

24 The Adjoint Matrix

25 Expansion by Cofactors (2 x 2)
I call this technique the Laplace expansion. Pierre-Simon Laplace Born: 23 March 1749 in Normandy, France Died: 5 March 1827 in Paris, France

26 Expansion by Cofactors (3x3)
Quick student exercise: Complete the example below (i.e. express algebraically)

27 Example Expansion by Cofactors (3x3)
Expanding about row 1: Quick student exercise: Expand about column 2 and show that the same result is obtained.

28 Matrix Inverse A square matrix A may have an inverse matrix A-1 such that: If such a matrix exists, then A is said to be nonsingular or invertible. The inverse matrix A-1 will be unique. A square matrix A is said to be singular if |A| = 0. If |A|  0, then A is said to be nonsingular

29 How did you ever find A-1? A lucky guess or somethin?
The Necessary Example Quick student exercise: Show A-1 A = I for this example. How did you ever find A-1? A lucky guess or somethin?

30 Finding A-1 for a 2 x 2 solve for x, y, z, and w in terms
of a, b, c, and d. (we will come back to this problem and solve it shortly)

31 Properties of Inverses
How much more of this can I absorb?

32 Finding Inverses Method 1 – Adjoint Matrix
Method 2 – Gauss-Jordan Elimination Method Elementary Row Operations (ERO) define an augment matrix [A:I] where I is an n x n identity matrix Perform ERO on [A:I] to obtain [I:A-1] Did you know: If |A| = 0, then A-1 does not exist!

33 Method 1: The Adjoint Method

34 Method 2 – The Gauss-Jordan Way
This is our way of doing it. We do it with elementary row operations. Carl Friedrich Gauss:   Wilhelm Jordan Gaussian Elimination

35 Elementary Row Operations (ERO)
Interchange ith and jth row: Ri  Rj Multiply the ith row by a nonzero scalar Ri  kRi Replace the ith row by k times the jth row plus the ith row Ri  kRj + Ri

36 The Augmented Matrix [ A : I ] [ I : A-1] ERO’s need an example?

37 The Example

38 Matrices and Systems of Linear Equations
Ax = b

39 The Augmented Matrix Ax = b [ A : I : b ] [ I : A-1 : b’ ] x = b’
ERO’s need an example? Did you know: implied in A-1 are all the ERO’s (arithmetic) to go from A to A-1

40 An Example R1  R1 /3 R2  R2 – R1 R2  3 R2 R1  R1 – (5/3)R2

41 Solving systems of linear eqs. using the matrix inverse
Matrix solution: AX = b A-1 (AX) = (A-1A)X = IX =X = A-1b

42 Example System or Eqs

43 Cramer’s Rule for solving systems of linear equations
I do it with determinants! Given AX = b Let Ai = matrix formed by replacing the ith column with b, then Gabriel Cramer Born: 31 July 1704 in Geneva, Switzerland Died: 4 Jan 1752 in Bagnols-sur-Cèze, France

44 An Example of Cramer’s Rule

45 Cramer solving a 3 x 3 system

46 Let’s use Cramer’s rule!
Finding A-1 for a 2 x 2 solve for x, y, z, and w in terms of a, b, c, and d. Let’s use Cramer’s rule! A rare moment of inspiration among a group of ENM students.

47 Finding A-1 for a 2 x 2

48 Finding A-1 for a 2 x 2

49 Finding A-1 for a 2 x 2 I get it. To find the inverse you swap the two diagonal elements, change the sign of the two off-diagonal elements and divide by the determinant.

50 A Numerical Example

51 Properties of Triangular Matrices
Triangular matrices have the following properties (prefix ``triangular'' with either ``upper'' or ``lower'' uniformly): The inverse of a triangular matrix is a triangular matrix. The product of two triangular matrices is a triangular matrix. The determinant of a triangular matrix is the product of the diagonal elements. A matrix which is simultaneously upper and lower triangular is diagonal The transpose of a upper triangular matrix is a lower triangular matrix and vice versa

52 Determinants by Triangularization
R’2  -5/4 R1 + R2 R’3  -4 R2 + R3

53 Solving Systems of Equations the Easy Way
There must be an easier way. Why not use Excel with VBA? to Excel with VBA…


Download ppt "ENM 503 Block 2 Lesson 7 – Matrix Methods"

Similar presentations


Ads by Google