Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matrix Arithmetic Prepared by Vince Zaccone

Similar presentations


Presentation on theme: "Matrix Arithmetic Prepared by Vince Zaccone"— Presentation transcript:

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

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

3 Here are a few examples of matrices with real numbers:
A matrix is a rectangular array. Usually the entries are just numbers, but they can be functions as well. 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 Here are a few examples of matrices with real numbers:
A matrix is a rectangular array. Usually the entries are just numbers, but they can be functions as well. Here are a few examples of matrices with real numbers: TRANSPOSE of a matrix The transpose is the same matrix, but the columns are written as rows, and the rows as columns. For example, 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 Here are a few examples of matrices with real numbers:
A matrix is a rectangular array. Usually the entries are just numbers, but they can be functions as well. 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) AC 8) BC 9) CB 10) AD 11) BTD 2 Rules of thumb: For addition/subtraction the matrices must be the 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

6 Here are a few examples of matrices with real numbers:
A matrix is a rectangular array. Usually the entries are just numbers, but they can be functions as well. Here are a few examples of matrices with real numbers: Can we perform the following operations? 1) 5A YES 2) A+B NO 3) C+D NO 4) A+D YES 5) D-2A YES 6) AB YES 7) AC NO 8) BC YES 9) CB YES 10) AD YES 11) BTD 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

7 1) 5A for scalar multiplication, the scalar is multiplied by every element of the matrix. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

8 1) 5A 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. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

9 6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns of matrix B. Let’s see how that works in practice: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

10 Row 1 times Column 1 goes in Row 1, Column 1 of the result.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns 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. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

11 Row 1 times Column 2 goes in Row 1, Column 2 of the result.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns 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. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

12 Row 2 times Column 1 goes in Row 2, Column 1 of the result.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns 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. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

13 Row 2 times Column 2 goes in Row 2, Column 2 of the result.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns 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. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

14 Try to get the last 2 entries on your own.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns of matrix B. Let’s see how that works in practice: Try to get the last 2 entries on your own. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

15 Try to get the last 2 entries on your own.
6) AB To get the product of two matrices, we will use dot products (also called inner product or scalar product) to multiply the rows of matrix A by the columns of matrix B. Let’s see how that works in practice: Try to get the last 2 entries on your own. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

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

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

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

19 Orthogonal Vectors Two vectors are said to be orthogonal when their scalar product is zero. Here are some calculations that we did for the previous example: This is row 1 of matrix A times column 1 of matrix D. These vectors are not orthogonal because their scalar product is not zero. This is row 2 of matrix A times column 3 of matrix D. 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 Rn. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

20 More about dot products:
Length of a vector (also called magnitude or norm or absolute value) For any vector in ℝ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) Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB


Download ppt "Matrix Arithmetic Prepared by Vince Zaccone"

Similar presentations


Ads by Google