Inverse Matrices Using Row Operations

While it is certainly possible to find the inverse of a matrix using your calculator, the process can also be done by hand using row operations. In the following video, we go through a simple example of how this works. Please note, we don’t really discuss the theory here – we will save that discussion for another time!

How to Find the Standard Deviation and Variance With a Graphing Calculator (TI83 or TI84)

Only the truly insane (or those in an introductory statistics course) would calculate the standard deviation of a dataset by hand! So what is left for the rest of us level headed folks? Statisticians typically use software like R or SAS, but in a classroom there isn’t always access to a full PC. Instead, we can use a graphing calculator to perform the exact same calculations. (note: If you like video better, scroll down for a video of this example)

Standard Deviation on the TI83 or TI84

For this example, we will use a simple made-up data set: 5, 1, 6, 8, 5, 1, 2. For now, I won’t talk about whether we will treat this as population data or sample data but we will get to that in a couple of steps. Also, while there is A LOT to talk about as far as interpretation, we will just focus on how to get the calculations down for now.

1. Enter your data into the calculator.
2. This will be the first step for any calculations on data using your calculator. To get to the menu to enter data, press [STAT] and then select 1:Edit.

Now, we can type in each number into L1. After each number, hit the [ENTER] key to go to the next line. The entire dataset should go into L1.

3. Calculate 1-Variable Statistics
4. Once the data is entered, hit [STAT] and then go to the Calc menu (at the top of the screen). Finally, select 1-var-stats and then press [ENTER] twice.

5. Select the correct standard deviation
6. Now we have to be very careful. There are two standard deviations listed on the calculator. The symbol Sx stands for sample standard deviation and the symbol $\sigma_{x}$ stands for population standard deviation. If we assume this was sample data, then our final answer would be $S_{x}=2.71$. Pay attention to what kind of data you are working with and make sure you select the correct one! In some cases, you are working with population data and will select $\sigma$.

Video

Here is a video that will walk you through the steps above.

What About the Variance

The variance does not come out on this output, however it can always be found using one important property:

Variance = $\text(Standard Deviation)^2$

So in this example, the variance is $s^2 = 2.71^2 = 7.34$. This would work even if it was population data, but the symbol would be $\sigma^2$.

Understanding y-Intercepts

It doesn’t matter what function you are looking at, the y intercept is the point at which the graph of that function crosses the y-axis. That means the point can always be written (0, c) for some number c.

The y-intercept is at y = -1. As a point, we would write (0, -1)

Finding y Intercepts

Along the y-axis, the x value of any point is zero. This means that to find the y intercept of any function, we can just let x = 0 and solve for y. For example, consider the function $y=\frac{1}{3}x+4$. If we let $x = 0$, then $y=\frac{1}{3}(0)+4 = 4$. As a point, this would be the point (0, 4).

Similarly, the function in the graph at the top of the page is, $y=x^2-1$. When $x = 0$, $y = 0^2 - 1 = -1.$, meaning the y intercept is -1, the same as on the graph. If this is still confusing, in the following video, I go through a couple more examples.

A Closer Look at the y Intercept

Now that we have seen how to find them, there are two interesting questions that can come up:

1. Can a function have more than one y intercept?
2. Can a function have no y intercept?

In answering these, remember that a function can only have one output (y-value) for each input (x-value). If a function has more than one y intercept, that means that there are two y’s for the input $x = 0$. This isn’t possible, so no, it is not possible for a function to have more than one y-intercept.

What about no y intercept? Well, take a look at the graph of $y=\frac{1}{x}$ below. It never crosses the y-axis, so it has no y-intercept.

This function has no y-intercept.

What happened? If you let $x=0$, you get $y = \frac{1}{0}$ which is undefined. This is just one example, but there are other similar functions, so yes, it is certainly possible for a function to not have a y-intercept.

Using a Graphing Calculator

Graphing calculators can be used to find x and y intercepts pretty quickly. A while back, I made a short video that can show you how this works. You can find it on the mathbootcamps youtube page.

What About x-Intercepts?

Well, you can take a look at my discussion on x intercepts right over here!

Finding the Inverse of a Matrix with a Calculator

By taking any advanced math course or even scanning through this website, you quickly learn how powerful a graphing calculator can be. A more “theoretical” course like linear algebra is no exception. In fact, once you know how to do something like finding an inverse matrix by hand, the calculator can free you up from that calculation and let you focus on the big picture.

Remember, not every matrix has an inverse. For now, just trust me that I picked an invertible matrix (one that has an inverse). We will talk about what happens when it isn’t invertible a little later on. Here is the matrix we will use for our example:

$\left[ \begin{array}{cccc} 8 & 2 & 1 & 6 \\ 8 & 4 & 1 & 1 \\ 0 & 2 & 6 & 4 \\ 15 & 8 & 9 & 20 \end{array} \right]$

1. Get to the Matrix Editing Menu
2. This is a much more involved step than it sounds like! If you have a TI 83, there is simply a button that says “MATRIX”. This is the button you will click to get into the edit menu. If you have a TI84, you will have to press [2ND] and [ $x^{-1}$ ]. This will take you into the menu you see below. Move your cursor to "EDIT" at the top.

Now you will select matrix A (technically you can select any of them, but for now, A is easier to deal with). To do this, just hit [ENTER].

3. Enter the Matrix
4. First, you must tell the calculator how large your matrix is. Just remember to keep it in order of "rows" and "columns". For example, our example matrix has 4 rows and 4 columns, so I type 4 [ENTER] 4 [ENTER].

Now you can enter the numbers from left to right. After each number, press [ENTER] to get to the next spot.

Now, before we get to the next step. On some calculators, you will get into a strange loop if you don't quit out of this menu now. So, press [2ND] and [MODE] to quit. When you do this, it will go back to the main screen.

5. Select the Matrix Under the NAMES Menu
6. After you have quit by clicking [2ND] and [MODE], go back into the matrix menu by clicking [2ND] and [ $x^{-1}$ ] (or just the matrix button if you have a TI83). This time, select A from the NAMES menu by clicking [ENTER].

7. Press the Inverse Key [ $x^{-1}$ ] and Press Enter
8. The easiest step yet! All you need to do now, is tell the calculator what to do with matrix A. Since we want to find an inverse, that is the button we will use.

At this stage, you can press the right arrow key to see the entire matrix. As you can see, our inverse here is really messy. The next step can help us along if we need it.

9. (OPTIONAL) Convert Everything to Fractions
10. While the inverse is on the screen, if you press [MATH] , 1: Frac, and then ENTER, you will convert everything in the matrix to fractions. Then, as before, you can click the right arrow key to see the whole thing.

That's it! It sounds like a lot but it is actually simple to get used to. It's useful too - being able to enter matrices into the calculator lets you add them, multiple them, etc! Nice! If you want to see it all in action, take a look at this video where I go through the steps with a different example. Even with the optional step, it takes me less than 3 minutes to go through.

Oh yeah - so what happens if your matrix is singular (or NOT invertible)? In other words, what happens if your matrix doesn't have an inverse?

As you can see above, your calculator will TELL YOU. How nice is that?

How I Make Screencast Videos for Math Bootcamps

As a short diversion from the typical math topics, I thought I would share a recent post from my own blog about how I make all these Math Bootcamps videos you see pop up on the blog.

I know when I first got started, it took a ton of searching around to figure out exactly how to get things going. It will always be a work in progress but through the years, I have definitely picked up a few tricks. Oh and if you know of some tricks that I don’t, make sure to let me know!

Understanding x Intercepts

Given the graph of any function like y = x – 2, the x intercept is simply the point where the graph crosses the x-axis. There might be just one such point or many. In either case, the idea stays the same. Another way to think about this is, the x intercept is the point on the graph where y = 0. This can be used to easily find the x intercept for any graph. In this guide, we will talk about how to find x intercepts using a graph, an equation, and a graphing calculator.

Finding the x-intercept or intercepts using a Graph

As mentioned above, functions may have one, zero, or even many x intercepts. These can be found by looking at where the graph of a function crosses the x-axis. This point (or these points) is graphed for each of the functions below.

Graph of $y = x - 2$

The x intercept is 2

Graph of $y = x^2 + 1$

The x intercepts are -1 and 1.

Graph of $y = x^4-8x^3-49x^2+260x+300$

The x intercepts are -6, -1, 5, and 10.

How to Find x Intercepts

When the graph of a function is crossing the x-axis, what does the point look like as an ordered pair? For instance, is the x-intercept is said to be 5, what point is this? Well, since there is no “height” to that point, we would write it as (5, 0). In fact, any x-intercept would have a 0 as the y-value.

We can use this to find the x-intercept of intercepts of any function if we have the equation. The general rule is let y = 0 and solve for x. How easy this is depends entirely on the equation!

As an example, let’s use the first equation graphed above: $y = x - 2$. If we let $y = 0$, then we get the equation $0 = x - 2$ This equation can be solved by using the usual rules for solving linear equations: we just add 2 to both sides and find the x intercept is $x = 2$.

Things are a little more complicated with the second example. If $y = 0$ in the equation $y = x^2 - 1$, then we get the quadratic equation $0 = x^2 - 1$. Adding 1 to both sides, we find that $x^2 = 1$ which has solutions 1 and -1 by the square root rule.

Of course, the idea remains the same even when we get to the last (much more complicated) equation $y = x^4-8x^3-49x^2+260x+300$. Setting y to zero and solving for x would give us all of the x-intercepts we see on the graph. However, this is a bit more algebra than we need for this article so we will save that equation for another day. Instead, if you need a few more examples, I have gone through some different types of functions in this video from the mathbootcamps youtube!

Finding x-intercepts on a Graphing Calculator

This is a bit more involved, but on this old youtube video I go through how to find both x and y intercepts using a TI 84.

What About y Intercepts?

Good question! I go over y-intercepts in this article.

How to Do a One Sample t-test (or z-test) using the Online Calculator Wolfram Alpha

I have been a fan of Wolfram Alpha from the very beginning. While there have been some changes I am not happy with (ads – no solutions without an account), there have also been several I love. One of those is the way they have reorganized things to make some really nice online statistics calculators.

Now, there are already a few online t-test calculators out there, but none of them seems to have the same amount of information or the same “ease of use”. To show you what I mean, I am going to make up a silly example that we can try out.

The mean weight of purses carried by students at a college is thought to be less than 10 pounds. In a random sample of 35 students from this college who carried purses, the average weight was 8.3 pounds with a standard deviation of 3.9 pounds. At a significance level of 0.05, is there evidence that the mean weight for all such students is less than 10 pounds, as thought?

As you can see, we are testing a hypothesis about the mean and do not know the population standard deviation. If our data is mostly symmetric or we have a large enough sample, we can use a t-test. Usually we would talk much more about assumptions and such but for the sake of this post, we aren’t focused on the theory. So, on to the calculations!

Step 1: Go to http://www.wolframalpha.com and type in “t-test”

You can also use this direct link: Wolfram Alpha t-test Calculator

Step 2: Enter information

I completely admit that this is a much bigger step than step 1. Before we can enter any information, we need to figure out our hypotheses and what information we have. We are testing the hypothesis that the mean weight of purses for all students at this college is less than 10 pounds. This would represent an alternative hypothesis of $H_{a}: \mu < 10$. In other words, our hypothesized mean is 10.

Next, we look closer at the problem and see the sample mean was 8.3 pounds and the sample standard deviation was 3.9 pounds. This all came from a sample of 35 students. Since that is all gathered, we are ready to input!

Notice how a little equal appears as we input data? Clicking that takes us to step 3.

Step 3: Interpret the output

After pressing that equals sign, we will get the following screen:

(direct link: Link to this t test output in wolfram alpha)

There is actually more which you can see if you press the link above. For this problem though, we have all the information we need. Notice the default output is the p-value and test statistic for a left tailed test. This can be adjusted by clicking the right tailed test or two tailed test buttons in the upper right of the output.

But we had a left tailed test as you can see by the alternative hypothesis given. Therefore, our p-value is 0.007 < $\alpha = 0.05$ and we reject the null hypothesis. So, we do in fact have evidence to support the original belief that the average purse weight will be less than 10 pounds. We could have also made this decision using the test statistic output.

As we will see in the video below, this site can also be used as a calculator for other hypothesis tests! Very nice!

How to Make a Box plot (Box and Whiskers Plot) By Hand

Typically, statisticians are going to use software to help them look at data using a box plot. However, when you are first learning about box plots, it can be helpful to learn how to sketch them by hand. This way, you will be very comfortable with understanding the output from a computer or your calculator.

Remember, the goal of any graph is to summarize a data set. There are many possible graphs that one can use to do this. One of the more common options is the histogram, but there are also dotplots, stem and leaf plots, and as I will show you here – boxplots (which are sometimes called box and whisker plots). Like a histogram, box plots ignore information about each individual data value and instead show the overall pattern.

In this example, I will use the data set below. Let’s suppose this data set represents the salaries (in thousands) of a random sample of employees at a small company.

 714141416 1820202123 2727272931 3132323436 4040404040 4251566065

Steps to Making Your Box plot

1. Calculate the five number summary for your data set.
2. The five number summary consists of the minimum value, the first quartile, the median, the third quartile, and the maximum value. While these numbers can also be calculated by hand (here is how to calculate the median by hand for instance), they can quickly be found on a TI83 or 84 calculator under 1-varstats. The video below shows you how to get to that menu on the TI84:

For this data set, I got the following output:

3. Identify outliers.
4. Other than “a unique value”, there is not ONE definition across statistics that is used to find an outlier. You will see over time studying statistics that different settings will use different techniques to flag or mark a potential outlier. With boxplots, this is done using something called “fences”. The idea is that anything outside the fences is a potential outlier and shouldn’t be included in the main group that we graph.

The lower fence is defined by the formula $Q_{1} - 1.5(IQR)$ where the IQR or inter-quartile range is $IQR = Q_{3}-Q_{1}$. Any value in the data set that is less than this number will be treated as an outlier and marked with a star on the graph. Let’s do the calculation:

$IQR = Q_{3}-Q_{1} = 40 - 20 = 20$
Lower fence: $Q_{1} - 1.5(IQR) = 20 - 1.5(20) = 20 - 30 = -10$

Since there are no values in the data set that are less than -10, there are no lower outliers.

The upper fence is defined by the formula $Q_{3} + 1.5(IQR)$ and anything greater than this number will be considered an outlier. As before, if a number is identified as an outlier, it will be marked with a star on the graph. Here the calculation would be: (remember IQR was 20)

$Q_{3} + 1.5(IQR) = 40 + 1.5(20) = 70$

The largest value in the data set is 65, so this means there is no upper outlier either!

5. Sketch the box plot using the model below.
6. The main part of the box plot will be a line from the smallest number that is not an outlier to the largest number in our data set that is not an outlier. If a data set doesn’t have any outliers (like this one), then this will just be a line from the smallest value to the largest value. The rest of the plot is made by drawing a box from $Q_{1}$ to $Q_{3}$ with a line in the middle for the median. As a general example:

Additionally, if you are drawing your box plot by hand you must think of scale. In this data set, the smallest is 7 and the largest is 65. So starting my scale at 5 and counting by 5 up to 65 or 70 would probably give a nice picture. The since, none of these are outliers, I will draw a line from 7 to 65 as the main part of the graph. Finally, I will add a box from our quartiles (20 and 40) and a line at the median of 31. All together:

Of course, a software version will look quite a bit better. Also note that boxplots can be drawn horizontally or vertically and you may run across either as you continue your studies. As an example, here is the same boxplot done with R (a statistical software program) instead:

Remember – pay attention to how these box plots are put together in order to do a better job at reading the information they provide. Since you now know that middle line is the median, you can just look at the box plot and know that 50% of the salaries were less than $31,000 or so. As you can see, a box plot can not only show you the overall pattern but also contains a lot of information about the data set! Visualizing Matrix Multiplication Matrix multiplication is just one of those things that is not intuitive – at least not at first. You have just had so many years of multiplication meaning one thing and then you have this entirely new definition to work with! It certainly takes some getting used to. (and if you continue to study advanced math – get used to that idea of “getting used to” things) When I first studied matrix multiplication, I had an “aha!” moment that really helped. What was this? Rows hit columns. The first row of the first matrix hits every column and fill up rows in the new matrix. This process is repeated until you run out of rows in the first matrix. This is a bit difficult to imagine so I have created a small animation to help (there is no audio – just the animation): http://www.mathbootcamps.com/media/matrix-animation.flv This is really a way of visualizing the dot-product definition of matrix multiplication. For instance, when the first row of matrix 1 “hits” the first column of matrix 2, we see the sum 1(5)+2(7) results. This comes from the following definition: $\left[ \begin{array}{c} a\\ b\\ \end{array} \right] \left[ \begin{array}{cc} c & d\\ \end{array} \right] = a(c)+b(d)$ The next entry is therefore 1(6)+2(8). At this stage, you have run out of columns to “hit” and the next row in the first matrix is used. As you continue to study matrices, you will likely find that this way of thinking about matrix multiplication works whether we are looking at multiplying two square matrices as above or more “odd” shaped matrices like those that can come up in linear algebra and similar courses. You Can Save Thousands of Dollars with CLEP Tests For better or worse, one of my main goals in college was to finish as quickly as possible. Yes I loved learning and yes I really loved taking every math course I could, but there were these other courses that… well… got in the way. Of course being a few years older now and having a bit more experience, I can see the value in every required course. But at the time? Let’s just say I was more focused on the time and money involved. In reality, college is a bit of a game. There is the “love for learning” aspect where you develop as a person by progressing through these different courses and there is the “get the piece of paper and a job (or go to grad school, etc)” aspect that, while not ideal, is a big part of things. This second aspect is what initially drove my research into CLEP tests. CLEP tests are given by the college board (the same group behind the SAT) and they have the test for a variety of subjects including college mathematics and college algebra for$77 each. Here is the biggie: Passing the test will result in credit for the corresponding course (depending on your college’s policy).

Think about that for a minute. A course is usually 3 credit hours. I don’t know about tuition near you, but near me the lowest I know of is about $150/credit hour and of course it only goes up from there. In other words, you pay$77 and get at LEAST 3 * $150 =$450 worth of credit. That doesn’t even account for the time saved! That is one less class to take and often it is a prerequisite to other courses. You can move on with your life!

I used CLEP tests to skip 6 credits of freshman composition courses and head straight to a really fun literature course (well, I didn’t think it would be fun but I KNEW I wasn’t going to pass a test to get out of it ). At my college, this saved me over \$1,500 and a full year of gen ed courses.

Anyone can study hard and pass a CLEP test. It’s worth researching the tests a bit to see if you can save some tuition here and there. Make sure you check with your prospective college as far as their rules for granting credit. Lucky for us, the college board made a sweet little tool you can use to find your college’s policy: http://clep.collegeboard.org/started.