Matrix and Vector Operations
Learning Objectives • Lesson 1: – Define matrices – Distinguish vectors and matrices – Identify square matrices – Perform basic matrix operations • Sum/subtraction • Multiply matrices |
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Definition • Array of numbers that can be represented |
Exercise 1 • Given the following matrices, identify the
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Types of Matrices • There are different types of • However, for the purpose of this
|
Vectors • Vectors are type of matrices that have • Matrices with one column (m=1) are |
Square matrices • If m=n, we have a square matrix, |
Matrix Operations • Addition: • Identify the dimensions of the matrices |
Example Adding Matrices • Given A and B, calculate C= A+B
|
|
Exercise 2 • Given the matrices, A, B, and C obtain matrix
|
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Operations • Subtraction: |
Example Subtracting Matrices • Given A and B, calculate C= A-B |
|
Exercise 3 • Given the matrices, A and B, obtain
|
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Operations • Multiplication of a matrix by a scalar: |
Exercise 4
• Given the matrices A, B, C, D |
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Operations |
• Product of two matrices – The number of columns in the first matrix(m1), must be equal to the number of rows in the second matrix (n2). If the conditions given above are not true, the two matrices can’t be multiply – The new matrix will have dimensions: n1m2 – Multiply each element of the row of the first matrix, by each element of the column of the second matrix and add them. This operation will generate the new elements of the product matrix |
|
• Given Matrices A and B, calculate |
|
• Given Matrices A and B, calculate |
|
Solution Example Continues
|
|
Exercise 5 • Given the matrices X and Y, calculate |
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Operations • Operations of product of matrices – The product of matrices is associative – The product of matrices is distributive
|
Exercise 6 • Given the matrices A, B, and C, and |
|
Review of Matrices – Definition – Types of matrices – Matrix operations |
Matrix Operations • Transpose
|
Solution Example Continues |
|
Exercise 7 • Given matrix A, calculate the transpose |
|
Summary • Can you define a matrix? |