## 17Calculus - Linear Algebra

Analysis

### Practice

Calculus 1 Practice

Calculus 2 Practice

Practice Exams

### Articles

Although we do not cover linear algebra completely, there are a few linear algebra techniques that you need to know in order to understand some topics on this site, specifically, the cross product.
This page is not meant to be a complete discussion of linear algebra at this time. It is included here so that you can refresh your memory or learn what you need to in order to fully understand calculus on other pages. If you are taking linear algebra, you can use this as an overview but you will also need a good textbook to be able to cover all the linear algebra material.
If you want to understand linear algebra at a deeper level, we recommend the following playlist of videos.

### Linear Algebra Videos

video by 3Blue1Brown

For more information on linear algebra, Dr Chris Tisdell has a series of videos that explain it in lots of detail. Here is a playlist with these videos.

### Dr Chris Tisdell - Linear Algebra

The topics of linear algebra and calculus overlap in several areas. Linear algebra is the study of matrices of any size. The overlap occurs in three main areas.

 1. Vectors are often represented as 2x1 or 3x1 matrices. 2. The determinant of a 3x3 matrix is used to calculate the cross product of two vectors in space. 3. The calculation of the Wronskian in solutions of second order linear differential equations is VERY similar to solving systems of linear equations using matrices and requires the calculation of determinants.

Basics of Matrices

Matrices are represented as rows and columns of items (usually numbers). Not only is the number itself important, the position in the matrix is also significant. Here is a simple 2x2 matrix.
$$\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$
Here is a simple 3x1 matrix.
$$\begin{bmatrix} 10 \\ 20 \\ 30 \end{bmatrix}$$
Here is a simple 1x3 matrix.
$$\begin{bmatrix} 10 & 20 & 30 \end{bmatrix}$$
Let's discuss some details about these matrices.

 When describing the dimensions of a matrix, we say rows X columns, usually shortened to rxc. So the above 3x1 matrix has 3 rows and 1 column. The numbers and their positions are important, i.e. if we have a matrix like the first 2x2 matrix where the 1 and the 2 are switched, that matrix is not the same as the above matrix. So we have to be careful where the numbers are written as well as the numbers themselves. For two matrices to be equal, they must have the same number of rows and columns and the entries in each position must be equal. The 3x1 matrix above is NOT equal to the 1x3 matrix since the number of rows and columns are not the same. One has 3 rows, the other has 1 row.

In order to calculate the cross product of two vectors, we need to know how to calculate the determinant of a 3x3 matrix. We will start with the determinant of a 2x2 matrix and build on that for 3x3 determinants.

2x2 Matrix Determinant

Given a 2x2 matrix
$$A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$$
The determinant of matrix A is written
$$det(A) = \abs{A} = \begin{vmatrix} a & b \\ c & d \end{vmatrix}$$
Notice we use single vertical bars around the name of the matrix( $$\abs{A}$$ ) and we replace the brackets with vertical bars on the matrix itself. This is an important distinction.
$$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$$
is a matrix, while
$$\begin{vmatrix} a & b \\ c & d \end{vmatrix}$$
is a determinant.

To calculate the determinant, we multiply the top left times bottom right diagonal and we subtract the other diagonal, top right times bottom left. It looks like this.

It is best not to memorize the formula but to visualize the concept of multiplying the diagonal elements.

3x3 Matrix Determinant Using Cofactors

In order to calculate the determinant of a 3x3 matrix, we build on the same idea as the determinant of a 2x2 matrix. Before we go through the details, watch this video which contains an excellent explanation of what we discuss here. You will need to work through this concept in your head several times before it becomes clear. So watch this video first and then go through the explanation that follows.

### Thinkwell - Finding a Determinant Using Expanding by Cofactors [9min-3secs]

video by Thinkwell

If we have a 3x3 matrix that looks like this
$$\begin{bmatrix} i & j & k \\ a & b & c \\ d & e & f \end{bmatrix}$$
we calculate the determinant by breaking the matrix into 2x2 matrices and calculating the determinant of each of those. It works like this.
Start with the element in the first row and first column, in this case $$i$$. We remove the row and column that $$i$$ is in and multiply $$i$$ by the determinant of the remaining 2x2 matrix. So the first element is
$$i \cdot \begin{vmatrix} b & c \\ e & f \end{vmatrix}$$
Of course, we know how to calculate the determinant of the 2x2 matrix.

We continue this procedure by going across the top row (you can also go down the first column and your answer will be the same but we need to go across the top row for calculating cross products). The second element is
$$j \cdot \begin{vmatrix} a & c \\ d & f \end{vmatrix}$$
and the third element is
$$k \cdot \begin{vmatrix} a & b \\ d & e \end{vmatrix}$$

Notice for each element, we remove the row and column for that item in the first row to get the corresponding 2x2 matrix.

Okay, now that we have all the elements, we need to put them together to get the result. We will show the result and discuss more afterwards.
$$\begin{vmatrix} i & j & k \\ a & b & c \\ d & e & f \end{vmatrix} = i \cdot \begin{vmatrix} b & c \\ e & f \end{vmatrix} - j \cdot \begin{vmatrix} a & c \\ d & f \end{vmatrix} + k \cdot \begin{vmatrix} a & b \\ d & e \end{vmatrix}$$
Notice that the middle element is subtracted but the first and last are added. This is important to obtaining the correct result.

Again, it is important to visualize the concept instead of memorizing equations as you learn how to do this.

Okay, here is a video with an example.

### PatrickJMT - Finding the Determinant of a 3 x 3 matrix [6min-55secs]

video by PatrickJMT

Notes
1. Calculating determinants can be done only on square matrices, i.e. matrices with the same number of rows and columns.
2. If the determinant of a matrix is zero, we say that the matrix is singular.
3. You do not have to go across the top row to form the cofactors like we did in the discussion above. However, there are rules about the sign that goes in front of each term depending on where you start. So, initially, while you are first learning this technique, we recommend that you stick with the first row or column and alternate signs, starting with a positive sign. (Of course, check with your instructor to see what they expect.)
4. For larger matrices (more than 3 rows and columns), we just repeat the procedure, remembering to alternate signs.

3x3 Alternate Method Using Diagonals

An alternate method for calculating the determinant involve calculating across diagonals. This method is kind of a 'shortcut'. So check with your instructor to see what they expect. Even if they don't allow you to use this technique on homework and exams, you can use it to check your work.
Note - You still need to be able to use the cofactor method since cofactors are important in other areas of linear algebra. However, in calculus, either method will suffice.

### MIP4U - Evaluating Determinants [1min-2secs]

video by MIP4U

For practice problems calculating determinants, see the precalculus determinants page.

Determinant Properties That Simplify Your Calculations

Here are a few properties of determinants that you can use to help simplify your calculations.

1. Column Factor - - If you have a column that contains a common factor, you can pull that common factor out before calculating the determinant. For example,
$$\begin{vmatrix} 2a & b \\ 2c & d \end{vmatrix} = 2 \begin{vmatrix} a & b \\ c & d \end{vmatrix}$$
Notice that we are saying that the determinants are equal, not the matrices themselves.

Higher Order Determinants

Determinants of larger matrices use the same techniques, i.e. cofactors and diagonals, for calculations. However, as you probably experienced with 3x3 matrices, the calculations can get messy and it is easy to make mistakes. However, the techniques are the same.

Solving Systems of Linear Equations With Cramers Rule

We can use matrices and determinants to solve systems of linear equations using a technique called Cramers Rule. We will show how to do this with 2 equations and 2 unknowns. However, the concept can be extended to higher order systems.

Problem

We are given a system of linear equations of the form
$$\begin{array}{ccccc} ax & + & by & = & z_0 \\ cx & + & dy & = & z_1 \end{array}$$
where $$a, b, c, d, z_0, z_1$$ are all real constants and the variables are $$x$$ and $$y$$.

We need to find what values of $$x$$ and $$y$$ solve this equation. There are three possible cases.
1. $$x$$ and $$y$$ are real, unique and not equal.
2. $$x$$ and $$y$$ are real and equal.
3. $$x$$ and $$y$$ are complex.

The key to determining which case holds is to look at the determinant of the coefficient matrix, i.e.
$$\begin{vmatrix} a & b \\ c & d \end{vmatrix}$$
If this determinant is zero, then we cannot use this technique and either case 2 or 3 hold. If this case is non-zero, then case 1 holds and we can solve this problem. Let's call the coefficient matrix $$A$$ and so
$$\abs{A} = \begin{vmatrix} a & b \\ c & d \end{vmatrix}$$

Solution

As long as the determinant of the coefficient matrix is NOT zero, we can solve this system of equations and the values are given by
$$\displaystyle{ x = \frac{ \begin{vmatrix} z_0 & b \\ z_1 & d \end{vmatrix} }{\abs{A}} }$$       and       $$\displaystyle{ y = \frac{ \begin{vmatrix} a & z_0 \\ c & z_1 \end{vmatrix} }{\abs{A}} }$$

In each case above, notice that we have replaced the column of matrix $$A$$ corresponding to the variable we are calculating with the $$z$$ constants.

Here are a couple of videos with examples.

### PatrickJMT - video 1

video by PatrickJMT

### PatrickJMT - video 2

video by PatrickJMT

For more information and practice problems using Cramer's Rule, see the precalculus Cramer's Rule page.

### linear algebra 17calculus youtube playlist

When using the material on this site, check with your instructor to see what they require. Their requirements come first, so make sure your notation and work follow their specifications.

DISCLAIMER - 17Calculus owners and contributors are not responsible for how the material, videos, practice problems, exams, links or anything on this site are used or how they affect the grades or projects of any individual or organization. We have worked, to the best of our ability, to ensure accurate and correct information on each page and solutions to practice problems and exams. However, we do not guarantee 100% accuracy. It is each individual's responsibility to verify correctness and to determine what different instructors and organizations expect. How each person chooses to use the material on this site is up to that person as well as the responsibility for how it impacts grades, projects and understanding of calculus, math or any other subject. In short, use this site wisely by questioning and verifying everything. If you see something that is incorrect, contact us right away so that we can correct it.