Matrices Notes
Matrices
Definition
- A matrix is a rectangular arrangement of numbers into rows and columns.
- The smallest matrix is a one by one.
- Matrices are represented by uppercase letters (e.g., matrix A).
Dimensions (Size)
- Determined by the number of rows and columns, in that order (rows x columns).
- Example: A matrix with 2 rows and 3 columns has a dimension of 2x3 (said "two by three").
- Rows by columns.
Square Matrix
- A matrix with the same number of rows and columns.
Matrix Element
- An entry within the matrix.
- Identified by the row and column in which it appears.
- Notation: lowercase letter of the matrix with subscripts indicating row and column (e.g., ).
- If matrix F contains element 1 in row 1, column 1, then .
Examples of Matrix Size
- Matrix A (2 rows, 3 columns): Size is 2x3.
- Matrix B (2 rows, 2 columns): Size is 2x2 (a square matrix).
- Matrix C (5 rows, 3 columns): Size is 5x3.
- Matrix D (4 rows, 1 column): Size is 4x1.
- A matrix must have at least one row or one column.
Element Identification by Location
- Matrix A =
- 2 is
- 1 is
- 7 is
- 3 is
Example
- Matrix B (3 rows, 4 columns): A 3x4 matrix.
- Identify the element .
- In matrix B, find the element in row 3, column 2 (e.g., 10).
- means row 1, column 4 (e.g., 4).
- means row 2, column 3 (e.g., 7).
- Finding the location of 8: . Finding the location of 9: . Finding the location of 3: .
Matrix Operations
- Addition, subtraction, and multiplication.
Matrix Addition and Subtraction
- Matrices can be added or subtracted if they have the same dimension (same number of rows and columns).
- This is done by adding or subtracting their corresponding elements (same row and column position).
Example A
- Adding a 4x2 matrix to another 4x2 matrix.
Example B
- Adding a 2x4 matrix to another 2x4 matrix.
- .
Example C
- Adding a 3x2 matrix to a 2x3 matrix is not possible (DNE - Does Not Exist) because the dimensions do not match.
Example D
- Subtracting a 3x3 matrix from another 3x3 matrix.
Example E
- Subtracting a 2x4 matrix from another 2x4 matrix.
Scalar Multiplication
- Multiplying a number (scalar) by a matrix.
- The size of the matrix does not matter.
- Multiply the scalar by every element within the matrix.
Example F
- -5 multiplied by a 2x2 matrix.
Example G
- 1/4 multiplied by a 3x2 matrix.
Example H
- Combining scalar multiplication with addition.
- , where A and B are 2x2 matrices.
Matrix Multiplication
- A matrix times a matrix.
- The columns of the first matrix must match the rows of the second matrix in order to multiply.
- If the dimensions are \ and , the resulting matrix size will be .
Algorithm
- Row by column multiplication with addition.
- Example: A (2x3) multiplied by B (3x2) results in a 2x2 matrix.
Example I
Multiplying a 2x2 matrix by a 2x3 matrix.
Example J
Multiplying a 3x3 matrix by a 3x1 matrix.
Example K
- Multiplying a 3x1 matrix by a 3x3 matrix.
- Columns of the first (1) do not match the rows of the second (3), so the operation is not possible (DNE).
Example L
- Squaring a matrix (multiplying a matrix by itself).