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.

Tuesday, October 9, 2018

Advanced Math Solutions - Matrix Row Echelon Calculator, Gaussian Elimination (Row Echelon Form)

In our previous blog posts, we talked about the Matrix basics. Now, we are ready to talk about a more advanced matrix topic, Gaussian Elimination (also known as row echelon form).

The Gaussian Elimination, is a method of putting a matrix in row echelon form (REF), using elementary row operations.

REF is when a matrix qualifies for the following two characteristics:
  • Each nonzero row has a leading coefficient (the first nonzero entry) that is to the right of the leading coefficient of the row above it
    • There can’t be any nonzero entries below the leading coefficient in the leading coefficient’s column
  • All zero rows are at the bottom

Note: A matrix in REF is not unique, so you may have a slightly different solution.

Here are examples of REF:




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


The elementary row operations you’ll use to put your matrix in REF are:
  • Switch any two rows
  • Multiply each entry in a row by a non-zero constant
  • Replace a row by the sum/difference of the row itself and another row, where it’s entries are multiplied by a non-zero constant

Here is a guideline on how to put a matrix in REF:
  1. Move all zero rows to the bottom
  2. Begin at the first row
  3. If the first entry is a zero, switch the row with a row below it that has non-zero entry in the first column
  4. If there are nonzero entries below the leading coefficient of the first row in the same column, cancel the entries by subtracting multiples of the the first row to the other rows (this will result in a zero entry)
  5. Repeat steps 2 - 4 and replace “first” with “second”, then “third”, and so on until you can’t do anything more

This topic can be hard to understand at first, so let’s see some examples to better understand.

First example (click here):


1.  Cancel the leading coefficient in Row 2: R_2-\frac{1}{3} R_1→ R_2


2. Simplify Row 2


We got rid of (canceled out) the 2 in Row 2 because there can’t be any entries below the leading coefficient in Row 1. We were able to do this using the elementary row operations. Multiplying Row 1 by ⅓, in order to turn 6 into 2, and then subtracting Row 2 by ⅓ Row 1.

Next example (click here):


1. Cancel the leading coefficient in Row 2: R_2-\frac{1}{2} R_1  →R_2


2. Cancel the leading coefficient in Row 3: R_3-(-\frac{3}{4} R_2) →R_3


Last example (click here):


1. Cancel the leading coefficient in Row 2: R_2-\frac{1}{2} R_1  →R_2


2. Cancel the leading coefficient in Row 3: R_3-\frac{1}{2} R_1→R_3


3. Since the second entry is a zero, switch the row with a row below it that has non-zero entry in the second column: R_3↔R_2



Putting matrices in REF can be tricky at first, but once you’ve done a handful of practice problems, it will come to you much easier. Check out Symbolab’s Row Echelon Calculator to help you better understand this topic.

Until next time,

Leah