"TI-82 Math Application"

by David Wollenberg

This Month: Lists

This month I'm going to be talkin about lists and how they can be used for math functions. First, a general introduction to lists:

Lists are used to store a variant amount of numbers in a row. When you put a number in a list, it stores it as a number in the list. The first number in say, list 1, would be L1(1). The seventh number would be L1(7). You can use a variable for the item selection, so if you had something like:

Lbl 1
For(A, 1, 10
Disp L1(A)
Goto 1

It would display the first 10 numbers stored in the list. There is a maximum of 99 numbers in each list. To put numbers into a list, there are two ways to do it. The easiest way, when you're not in a program, is to enter themone by one on the list screen. To do this, press 'Stat', 'Edit..' and then just enter the numbers you want. Besides numbers, you can also use expressions, like 2+3. The other way is to store the numbers like you store a variable. Enter the numbers you want, seperated by commas, inside curly brakets, { and }, then press sto>(list number). The list numbers are above keys 1-6. If you want to save a number to a specific part of a list, say 5 in list element 4, you'd do 5->L1(4).

Now to do math. If you add, subtract, multiply, or divide a number to a list, it does it to every number in the list. For example, if List 1 was {1,2,3}, 5+L1 would give you {6,7,8}. You can add two equal size lists together. When you do this, the matching elements are added to each other (the two first elements, the two second elements, etc.) You can also multiply, subtract, and divide two lists, and you can also do all of this with more than two lists as long as they all have the same number of elements in them. Here's how to use the stuff in the 'List', 'Math' menu:

Min( - This has two functions. The first is to find the smallest element in a list. You'd use Min(L1 for something like this. The other function is to compare two equal size lists and get the smallest element in each "Element slot". If L1= {1,5,9} and L2= {3,2,6}, min(L1,L2 would give you an answer of {1,2,6}.

Max( - same thing as min(, but with the highest instead of lowest

mean( - finds the mean (the average) of the numbers in a list. You can also use mean with two equal size lists. This will find the mean of the numbers in the first list, but each element will be counted the number of times as it's matching element in the other list. Confusing? Not really. Using "mean( {1,2,3}, {2,5,3}", 1 would be counted twice, 2 would be counted 5 times, and 3 would be counted 3 times, so it would be like doing (1+1+2+2+2+2+2+3+3+3)/10.

median( same thing as mean(, but with the median of the numbers.

sum - adds up all the numers in a list

prod - multiplies all the numbers in a list

Here's a bunch of other cool stuff you can do with list statistics funtions:

dim- returns the size (# of elements) of a list. Useful to see if two lists are the same size (If dim L1 = dim L2). Another good use is if you want a program to add a number to the end of a list, but you don't know how big the list will be when the program gets to it. Yuo would do: (dim L1)+1 ->A: 5 -> L1(A) or something to that effect with your numbers. Dim can also be used to create an empty list; 4 -> dim L1 would make L1 have a size of four elements all of which are 0. One more thing dim can do: If you have an already made list, doing 4->dim L1 would cut L1 down to its first four elements.

fill( - fills a list with the number you specify; fill(7,L2 would make L2 completely 7's.

That's about all for common usage. Some notes about lists. If you try to use a function with a list, it has to work for every item in the list. For example, if you did (sqroot){1,5,-1} you'd get an error because negative numbers don't have real roots. This doesn't apply for graphing however; if you do something illegal while graphing, the calc just ignores it. When you're doing almost anything with two lists, they MUST be the same size or else it won't work. That's all for this this month. Until next time, keep those batteries charged and those pencils sharpened :-)