Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matrix Arithmetic Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB.

Similar presentations


Presentation on theme: "Matrix Arithmetic Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB."— Presentation transcript:

1 Matrix Arithmetic Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

2 A matrix is a rectangular array. Usually it is just numbers, but can be functions. Here are a few examples of matrices with real numbers: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

3 A matrix is a rectangular array. Usually it is just numbers, but can be functions. Here are a few examples of matrices with real numbers: We can indicate the shape of a matrix by a pair or numbers mxn where m = # of rows n = # of columns Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

4 A matrix is a rectangular array. Usually it is just numbers, but can be functions. Here are a few examples of matrices with real numbers: Can we perform the following operations? 1) 5A 2) A+B 3) C+D 4) A+D 5) D-2A 6) AB 7) BC 8) CB 9) AD 10) DA 2 Rules of thumb: For addition/subtraction the matrices must be the same shape (same # of rows and columns) For multiplication, the # of columns of the first matrix must be the same as the # of rows of the second matrix. The result will have the same # of rows as the first, and same # of columns as the second. We can indicate the shape of a matrix by a pair or numbers mxn where m = # of rows n = # of columns Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

5 A matrix is a rectangular array. Usually it is just numbers, but can be functions. Here are a few examples of matrices with real numbers: Can we perform the following operations? 1) 5AYES 2) A+BNO 3) C+DNO 4) A+DYES 5) D-2AYES 6) ABYES 7) ACNO 8) BCYES 9) CBYES 10) AD YES We can indicate the shape of a matrix by a pair or numbers mxn where m = # of rows n = # of columns Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

6 1) 5A Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB for scalar multiplication, the scalar is multiplied by every element of the matrix. 4) A+D for matrix addition, corresponding elements are added. For these operations, the resulting matrix is the same size as the original matrix.

7 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice:

8 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product, or inner product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice: Row 1 times Column 1 goes in Row 1, Column 1 of the result.

9 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice: Row 1 times Column 2 goes in Row 1, Column 2 of the result.

10 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice: Row 2 times Column 1 goes in Row 2, Column 1 of the result.

11 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice: Row 2 times Column 2 goes in Row 2, Column 2 of the result.

12 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 6) AB To get the product of two matrices, we need to use the scalar product (or dot product). Here is the definition from the book: The ijth entry of the product AB is the dot product of the ith row of matrix A and the jth column of matrix B. Let’s see how that works in practice: Try to get the last 2 entries on your own.

13 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB 9) AD Do this multiplication.

14 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB Do this multiplication. Notice that the result is a DIAGONAL matrix. This is a very useful type of matrix. We will see why soon. 9) AD

15 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB Orthogonal Vectors Two vectors are said to be orthogonal when their scalar product equals zero.

16 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB Orthogonal Vectors Two vectors are said to be orthogonal when their scalar product equals zero. Here are some calculations that we did for the previous example: This is row 1 of matrix A times column 1 of matrix B. These vectors are not orthogonal because their scalar product is not zero. This is row 2 of matrix A times column 3 of matrix B. These vectors are orthogonal because their scalar product is zero. If we were to graph these vectors they would form a right angle. Orthogonal means perpendicular when dealing with vectors in R n.

17 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB More about dot products: Length of a vector (also called magnitude or absolute value) For any vector in R n, its length is defined to be: This is a generalization of the distance formula (Really just the Pythagorean Theorem) that you already know. For example, the length of a vector is computed below: Angle between vectors The following formula can be used to find the angle between 2 vectors: Not that if the vectors are orthogonal, the angle will be 90° (or π/2 radians)


Download ppt "Matrix Arithmetic Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB."

Similar presentations


Ads by Google