Repository navigation
Matrix Basics
Linear Algebra deals primarily with matrices, which are boxes of numbers. Here's an example of a matrix:
We typically use capital letters to denote matrices. The matrix
Important
By convention, we always use a (row,column) convention when working with matrices.
Note
Most matrices we encounter in STEM applications are very large, with hundreds or thousands of rows and/or columns. In this class, we'll do all our hand calculations using small matrices with up to 5-6 rows/columns. We'll work with larger matrices in our Python labs.
This is a list of some basic matrix operations with examples:
- Addition/subtraction works by corresponding components:
- Scalar multiplication also works by component:
- The transpose of a matrix, denoted
$\large A^T$ , is the matrix we get if we turn the rows of$\large A$ into columnns (or, equivalently, the columns into rows):
-
A square matrix is a matrix that has the same number of rows and columns (a
$\large 2\times 2$ , a$\large 3\times 3$ , etc.) -
The identity matrix
$\large I$ is a square matrix with this form:
-
A zero matrix can be any size and consists only of 0's.
-
Vectors can be considered 1-dimensional matrices. So,
- The diagonal of a square matrix is the line of elements connecting the upper left element to the bottom right element.
Every square matrix is associated with a number called a determinant. For larger matrices, computing a determinant can be difficult. But we will only need to compute determinants for
The determinant is the difference of the product of the diagonal elements times the off-diagonal elements of the matrix.
The product of two matrices has a trickier definition than addition or subtraction. The product
Here's a video example of how this works:
Because of this definition, matrix multiplication is not always defined. For
Warning
Matrix multiplication is not commutative! That is, even if they both exist (which they often don't),
Note
We will see soon why matrix multiplication has this funny definition. It's related to the way we represent systems of equations in linear algebra.
Since a vector is just a one dimensional matrix, matrix-vector multiplication is just a small case of matrix-matrix multiplication. For example:
I can:
- Use linear algebra terminology and notation.
- Perform basic matrix computations.
- Multiply matrices together (or recognize when the matrix product does not exist).