section 4 4 matrices.pdfsolving for x and y 2x + 4 = 12 subtract 4 from both sides 2x = 8 divide...

30
Section 4.1 Using Matrices to Represent Data

Upload: others

Post on 31-Jan-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Section 4.1

Using Matrices to Represent Data

Matrix Terminology

• A matrix is a rectangular array of numbers enclosed in a single set of brackets.

• The dimensions of a matrix are the number of horizontal rows and the number of vertical columns it has.

• For example, if a matrix has 2 rows and 3 columns, its dimensions are 2 x 3.

• Each number in the matrix is an called an entry or element.

Using Matrices to Represent Data

Inventory (June 1)Small Large

Sales (June)Small Large

Deliveries (June)Small Large

Picnic tables

8 10 7 9 15 20

Barbeque grills

15 12 15 12 18 24

The table below shows business activity for one month in a home-improvement store. The table shows stock (inventory on June 1), sales (during June), and receipt of new goods (deliveries in June).

Examples of Matrices

Inventory Matrix

Small Large

Picnic tables ⌈ 8 10 ⌉

Barbeque grills ⌊ 15 12 ⌋

⌈ 8 10 ⌉ ͟ M ͟ ⌈m₁₁ m₁₂⌉

⌊ 15 12 ⌋ ͞ ͞ ⌊m₂₁ m₂₂⌋

M is the name of the matrix.

Sales Matrix

Small Large

Picnic tables ⌈ 7 9 ⌉

Barbeque grills ⌊ 15 12 ⌋

⌈ 7 9 ⌉ ͟ S ͟ ⌈s₁₁ s₁₂⌉

⌊ 15 12 ⌋ ͞ ͞ ⌊s₂₁ s₂₂⌋

S is the name of the matrix.

If Two Matrices are Equal

• Two matrices are equal if they have the same dimensions and if corresponding entries are equivalent.

• Solve ⌈2x+4 5 1⌉ ͟ ⌈12 5 1⌉ for x & y.

⌊ -2 -3y + 5 -4⌋ ͞ ⌊-2 5y – 3 -4⌋

Because the matrices are equal:

2x + 4 = 12 and -3y + 5 = 5y – 3.

Solving for x and y

2x + 4 = 12

Subtract 4 from both sides

2x = 8

Divide both sides by 2

X = 4

-3y + 5 = 5y – 3

Add 3y to both sides

5 = 8y – 3

Add 3 to both sides

8 = 8y

Divide both sides by 8

1 = y

Addition and Scalar Multiplication

• To find the sum (or difference) of matrices A and B with the same dimensions, find the sums (or differences) of corresponding entries in A and B.

• Scalar multiplication is multiplication of each entry in a matrix by the same real number.

Properties of Matrix Addition

• For matrices A, B, and C, each with dimensions of m x n:

• Commutative A + B = B + A• Associative (A + B) + C = A + (B + C)• Additive Identity The m x n matrix having 0 as

all of its entries is the m x n identity matrix for addition.

• Additive Inverse For every m x n matrix A, the matrix whose entries are the opposite of those in A is the additive inverse of A.

Section 4.2

Matrix Multiplication

Matrix Multiplication

• If matrix A has dimensions m x n and matrix B has dimensions n x r, then the product AB has dimensions m x r.

• Find the entry in row i and column j of AB by finding the sum of the products of the corresponding entries in row i of A and column j of B.

Matrix Multiplication

• If matrix A has the dimensions 2 x 3 and matrix B has the dimensions 3 x 2, then:

• AB will have the dimensions 2 x 2.

• BA will have the dimensions 3 x 3.

• For AB, 2 x 3 3 x 2, the 2’s are the outer dimensions and the 3’s are the inner dimensions.

• For BA, 3 x 2 2 x 3, the 3’s are the outer dimensions and the 2’s are the inner dimensions.

Matrix Multiplication

• If the inner dimensions are the same, then multiplication can occur. The outer dimensions give the product dimensions after multiplication occurs.

• If the inner dimensions are not the same, then multiplication cannot occur.

Matrix Multiplication

⌈ 2 - 3⌉ ⌈5 0⌉

Let R = | 0 5| and W = ⌊4 7⌋

3x2 ⌊ - 2 0⌋ 2x2Row 1 of R, Column 1 of W Row 1 of R, Column 2 of W

⌈(2)(5) + (-3)(4) (2)(0) + (-3)(7)⌉

Row 2 of R, Column 1 of W Row 2 of R, Column 2 of W

|(0)(5) + (5)(4) (0)(0) + (5)(7)|

Row 3 of R, Column 1 of W Row 3 of R, Column 2 of W

⌊(-2)(5) + (0)(4) (-2)(0) + (0)(7)⌋

Matrix Multiplication

⌈ - 2 - 21⌉

RW = | 20 35|

⌊ - 10 0⌋

WR - does not exist because the inner dimensions do no not match.

W 2 x 2 3 x 2 R

Matrix Multiplication

• A network is a finite set of connect points.

• Each point is called a vertex.

• A directed network is a network in which permissible directions of travel between the vertices are indicated.

• You can represent a network in an adjacency matrix, which indicates how many one-stage (direct) paths are possible from one vertex to another.

Section 4.3

The Inverse of a Matrix

Square Matrix

• A square matrix is a matrix that has the same number of columns and rows. 2x2, 3x3, 4x4,…

• An identity matrix, called I, has 1’s on the main diagonal and 0’s elsewhere.

⌈ 1 0 0⌉

• I₃x₃ = | 0 1 0|

⌊ 0 0 1⌋

More About Matrices

The Identity Matrix of Mult.

• Let A be a square matrix with n rows and n columns. Let I be a matrix with the same dimensions and with 1’s on the main diagonal and 0’s elsewhere. Then AI = IA = A

The Inverse of a Matrix

• Let A be a square matrix with n rows and n columns. If there is an n x n matrix B, such that AB = I, then A and B are inverses of one another. The inverse of matrix A is denoted by A⁻ ¹.

• Note A⁻ ¹ ≠ 1/A

Determinant of a 2 x 2 Matrix

• Let A = ⌈a b⌉.

⌊c d⌋

The determinant of A, denoted by det(A) or

|a b|

|c d|,

Is defined as det(A) = |a b| = ad – bc.

|c d|

Matrix A has an inverse if and only if det(A) ≠ 0.

Section 4.4

Solving Systems With Matrix Equations

Solving Systems With Matrix Equations

• A matrix equation – an equation of the form AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constant matrix.

• A system of linear equations can be used to represent situations and be written as a matrix equation.

Solving a Matrix Equation

Real Numbers

ax = b

(1/a)(ax) = (1/a)(b)

(1/a)(a)x = b/a

x = b/a

A linear equation of the form ax = b, where a, b, and x are real numbers and a ≠ 0.

Matrices

AX = B

A⁻ ¹(AX) = A⁻ ¹(B)

(A⁻ ¹)(A)X = A⁻ ¹(B)

I X = A⁻ ¹(B)

X = A⁻ ¹(B)

Example

5x + 2y – z = - 7 ⌈5 2 - 1⌉ ⌈x⌉ ⌈- 7⌉

x - 2y + 2z = 0 → |1 - 2 2||y| = | 0 |

3y + z = 17 ⌊ 0 3 1⌋ ⌊z⌋ ⌊17⌋

⌈x⌉ ⌈5 2 - 1⌉⁻ ¹ ⌈- 7⌉

|y| = |1 - 2 2| | 0 |

⌊z⌋ ⌊ 0 3 1⌋ ⌊17⌋

⌈x⌉ ⌈- 2⌉

|y| = | 4 |

⌊z⌋ ⌊ 5 ⌋ Thus, the solution is x = - 2, y = 4, and z = 5.

Section 4.5

Using Matrix Row Operations

Using Matrix Row Operations

• The row-reduction method of solving a system allows you to determine whether the system is independent, dependent, or inconsistent.

• The row-reduction method is performed on an augmented matrix. An augmented matrix consists of the coefficients and constant terms in the system of equations.

• Reduced row-echelon form – an augmented matrix is in this form if the coefficient columns form an identity matrix.

Elementary Row Operations

• The following operations produce equivalent matrices, and may be used in any order and as many times as necessary to obtain reduced row-echelon form.

• Interchange two rows.

• Multiply all entries in one row by a nonzero #.

• Add a multiple of one row to another.

Example

System Augmented Matrixm + a + n = 21 ⌈1 1 1 : 21⌉

2m + a = 23 |2 1 0 : 23|

a + 3n = 25 ⌊0 1 3 : 25⌋

coefficients constants

-2R₁ + R₂ → R₂

⌈1 1 1 : 21⌉

|0 -1 -2 : -19|

⌊0 1 3 : 25⌋

Example Cont.

R₂ + R₁ → R₁ -1 R₂ → R₂

⌈1 0 - 1: 2 ⌉ ⌈1 0 - 1: 2 ⌉

|0 -1 -2 : -19| |0 1 2 : 19|

⌊0 1 3 : 25⌋ ⌊0 1 3 : 25⌋

-1 R₂ + R₃ → R₃ R₃ + R₁ → R₁

⌈1 0 -1 : 2 ⌉ ⌈1 0 0 : 8 ⌉

|0 1 2 : 19| |0 1 2 : 19|

⌊0 0 1 : 6 ⌋ ⌊0 0 1 : 6 ⌋

Example Cont.

-2R₃ + R₂ → R₂

⌈1 0 0 : 8 ⌉

|0 1 0 : 7 |

⌊0 0 1 : 6 ⌋

The matrix is now in reduced row-echelon form.

m = 8, a = 7, n = 6

Dependent, Independent, or Inconsistent

• Dependent System – a system of equations that has infinitely many solutions.

• Independent System – a system of equations that has exactly one solution.

• Inconsistent System – a system of equations or inequalities that has no solution.