Tuesday, January 8, 2019

Advanced Math Solutions - Matrix Inverse Calculator, Determinants

Last blog post, I talked about what the inverse of a matrix is. In this blog post, I will go over what the determinant of matrix is and how to calculate.

The determinant is a value calculated from an n\times n matrix. The determinant of a matrix, A, can be denoted as det(A), det A, or |A|. There are many uses for determinants. The determinant can be used to solve a system of equations. The determinant can tell you if the matrix is invertible or not (it is not if the matrix is 0).

We will discuss three ways to solve three different types of matrices.

Determinant of a 2x2 matrix:

Determinant of a 3x3 matrix:


Determinant of a nxn matrix that is 4x4 or larger:

1. Put the matrix in REF (here is the blog post on REF for reference)
  • Make note of how many times you swapped rows to achieve putting the matrix in REF 
2. Calculate the product of the elements in the diagonal
  • If no rows were swapped, this is the determinant
3. If rows were swapped, multiply the product of the elements in the diagonal by (-1) raised to the number of times rows were swapped. This will give you the determinant.
  • Swapping rows changes the sign of the determinant

Let’s see some examples to better understand how to calculate the determinant.

First example (click here):


1. Use this formula:



Next example (click here):


1. Use this formula: 


Last example (click here):


1. Put the matrix in REF


Since there is already a blog post on how to put a matrix in REF, I am not going to go through the steps for doing this. You can look at the link for this last example to see how to do this.

Note that rows were swapped 3 times to achieve putting the matrix in REF.

2. Calculate the product of the diagonal


3. If rows were swapped, multiply the product of the diagonal by (-1) raised to the number of times rows were swapped.


As you can see, this is a lot of material to learn and remember. Don’t let it intimidate you! Once you start practicing, it will get easier. For more help or practice on this topic, check out Symbolab’s Practice. Next blog post, I will talk about a shortcut for calculating the inverse of a 2x2 matrix, using its determinant.
Until next time,

Leah

Tuesday, December 4, 2018

Advanced Math Solutions - Matrix Inverse Calculator, Matrices

In this blog post, I will talk about how to get the inverse of a matrix. Please refresh yourself on RREF before continuing, if you haven’t mastered this topic yet.

What is the inverse of a matrix?
The inverse of a matrix is like the reciprocal of a number. The inverse of an n\times n matrix A is A^{-1},an n\times n matrix, such that A⋅A^{-1}=I, where I is the identity matrix. Just like how the product of a number and its reciprocal equals 1, (\frac{1}{n}⋅n=1), the product of a matrix and its inverse equals the identity matrix.

An identity matrix is an n\times n matrix, where the main diagonal of the matrix is all 1s and everywhere else in the matrix is 0s.


Note: You can only calculate the inverse of a square (n\times n) matrix.

There are a couple of methods used to find the inverse of a matrix. In this blog post, we will go over the method that Symbolab uses, which is one of the most common methods.

How do you calculate the inverse of a matrix?
1. Augment the n\times n matrix A with the n\times n identity matrix to create matrix (A|I)
  • Augmenting a matrix means to create a matrix by appending the columns of two matrices
  • Augmenting the matrix allows you to perform the same elementary row operations on both sides of the matrix
2. Put the matrix on the left hand side of the augmented matrix in RREF
  • The matrix on the left hand side will be converted to the identity matrix   
  •   Whatever elementary row operations you do to the left matrix will be done to the matrix on the right
3. The inverse matrix, A^{-1}, is to the right of the augmented matrix

Doesn’t sound too complicated right? As long as you’ve master putting matrices in RREF, this should be a piece of cake. Let’s see some examples!

First example


1. Augment the matrix with the identity matrix


2. Put the matrix on the left in RREF

                                                                        R_2-R_1→R_2

                                                                       \frac{1}{3} R_2→R_2

                                                                      R_1-R_2→R_1

                                                                       \frac{1}{2} R_1→R_1

3. The inverse matrix is on the right of the augmented matrix

You can verify that this is the inverse of the matrix by multiplying the inverse of the matrix and the matrix together (see here). If the product equals the identity matrix, then it is the inverse.


Next example (click here):


1. Augment the matrix with the identity matrix


2. Put the matrix on the left in RREF

Since we’ve already gone over how to put a matrix in RREF in a previous blog post and in the first example, we won’t go over how to do this.

3. The inverse matrix is on the right of the augmented matrix


Last example (click here)


1. Augment the matrix with the identity matrix


2. Put the matrix on the left in RREF


3. The inverse matrix is on the right of the augmented matrix


As you can see, as long as you know how to put a matrix in RREF, finding the inverse of a matrix doesn’t require too much additional work.

It is important to make sure that you double check your answer by verifying the product of the matrix and its inverse is the identity matrix because it is very easy to make mistake while adding and subtracting rows.

For more help or practice on this topic, check out Symbolab’s Practice.
Next blog post, I’ll talk about what the determinant of a matrix is and how to calculate it.

Until next time,

Leah

Tuesday, October 23, 2018

Advanced Math Solutions - Matrix Gauss Jordan Reduction Calculator, Gauss Jordan Elimination

In our previous blog posts, we talked about Row Echelon Form (Gaussian Elimination). If you haven’t, please look over it before continuing with this blog post.

In this blog post, we’ll talk about another advanced matrix topic that uses the same concepts, Gauss Jordan Elimination.

The Gauss Jordan Elimination is a method of putting a matrix in row reduced echelon form (RREF), using elementary row operations, in order to solve systems of equations, calculate rank, calculate the inverse of matrix, and calculate the determinant of a matrix (we will cover this in the next few blog posts).

RREF is when a matrix qualifies for the following four characteristics:
  • Each non-zero row has 1, called a leading 1, as their first non-zero entry
  • Each column with a leading 1 has zeros in every other entry
  • As you move down the rows, the leading 1 moves to the right 
  • All zero rows are at the bottom

Another thing to note: Unlike matrices in REF, matrices in RREF are unique.

Here are examples of matrices in RREF:


Here are examples of matrices that aren’t in RREF:


You’ll use the same elementary row operations that you use to put a matrix in REF to put a matrix in RREF.

Here are guidelines on how to put a matrix in RREF:
  1. Put the matrix in REF
  2. If there are nonzero entries in the column of the leading coefficient in the first row, make them 0 by using the elementary row operations
  3. If the leading coefficient in the first row is not a 1, make it a 1 by multiply the row by the reciprocal (this turns the leading coefficient into the leading 1)
  4. Repeat steps 2-3 and replace “first” with “second”, then “third”, and so on

Gauss Jordan Elimination can be tricky the first few times, so I will walk you through 3 examples.

First example (click here):


1.  Put the matrix in REF


2.  Get rid of the nonzero entry in the column of the leading coefficient in Row 2: R_1-5R_2→R_1



3.  Turn the leading coefficient into a 1 in Row 1: \frac{1}{5} R_1→R_1


4.  Turn the leading coefficient into a 1 in Row 2: \frac{1}{2} R_2→R_2


Example 2 (click here):


1. Put the matrix in REF


2. Turn the leading coefficient in Row 1 into 1: \frac{1}{3} R_1→R_1


3. Turn the leading coefficient in Row 2 into 1: \frac{1}{8} R_2→R_2


In this problem there was no leading coefficient in Row 3, so we didn’t have to get rid of the entries in column 3.

Example 3 (click here):


1. Put the matrix in REF


2. Get rid of the nonzero entry in the column of the leading coefficient in Row 2: R_1-3R_2→R_1


3. Turn the leading coefficient in Row 1 into 1: \frac{1}{3} R_1→R_1


4. Turn the leading coefficient in Row 2 into 1: 3R_2→R_2


5. Turn the leading coefficient in Row 3 into 1: \frac{1}{2} R_3→R_3



Putting a matrix in RREF can require a lot of steps, so it is important to document what you are doing in each row. This will help you look over your work and remember what you did. Just like putting a matrix in REF, practice will help you get better at putting a matrix in RREF.

For more help or practice on this topic, visit Symbolab’s Practice.

Until next time,

Leah.