Matrices and Their Commands

A matrix is a rectangular grid of elements. On the TI-68k calculators, matrices can contain any mix of any scalar (non-list) variable type that's valid in an expression: you can have matrices of numbers, matrices of strings, matrices of truth values or expressions. You can even mix and match variable types — it's perfectly all right to have a string in one element, and a number in the next.

There are three ways to enter a matrix on the calculator:

  • Using nested [ ] brackets: e.g. [[a,b,c][d,e,f]] (this is a matrix with 2 rows - the row a,b,c above the row d,e,f).
  • Using [ ] brackets and semicolons: e.g. [a,b,c;d,e,f]
  • Using { } brackets: e.g. {{a,b,c},{d,e,f}} (this works because matrices are actually stored as lists of lists)

You can access a certain element of the matrix by writing the coordinates of the element you want in [ ] brackets after it: matrix[r,c] would access the element in the rth ROW and the cth COLUMN of the matrix (Matrices are always indexed first by the row, top to bottom, and second by the column, left to right). Also, using one index — matrix[r] — returns the rth row of the matrix as a 1 by # matrix.

On earlier calculator models, matrices had the random access property: accessing any element of a matrix took the same amount of time. This was possible because the matrices were restricted to numbers. On the 68k calculators, since matrices can mix element types, they are no longer random access: the calculator has to go through the entire matrix to get to an element, so the larger an index is, the longer it takes to access. This isn't significant for small matrices. But the time keeps increasing linearly, so it can be very slow to access the last elements of a large matrix.

Except for the constraint of free memory, and of the time it takes to access elements, there is no limit on the number of elements a matrix may have.

Matrices as Vectors

In mathematics, a vector is a list of n numbers with a geometrical representation in n-dimensional space (two representations, actually: as a point in n-space, and as a translation which takes the origin to that point). 2- and 3-dimensional vectors are used respectively for 2-dimensional space (the plane), and the usual 3-dimensional space.

On TI-68k calculators, matrices with only one row, or only one column, are interpreted as vectors for the purposes of the commands dotP(), crossP(), and unitV(), as well as the formatting commands ▶Cylind, ▶Polar, ▶Rect, and ▶Sphere.

Linear Algebra Operations

Common mathematical commands and operators extend to matrices in a linear algebraic way. +, -, and *, for two matrices, are the corresponding matrix operations (in particular, matrix multiplication is quite complicated). ^ raises a square matrix to an integer power by multiplying it by itself; if the integer is negative, it takes the inverse first.

Matrices have a special operator just to themselves: T, called the transpose operator. It flips the matrix about its main diagonal, so rows become columns and columns become rows.

The operators +, -, *, and / can be applied to a square matrix and a scalar as well, by multiplying the scalar by the identity matrix. For multiplication and division, this results in the operation being done to each element, while addition and subtraction result in adding or subtracting the scalar to each element on the main diagonal.

Since occasionally you want to do these operations element-by-element, the alternatives .+, .-, .*, ./, and .^ have been provided, which do this for both two matrices and for a matrix and an expression.

For diagonalizable square matrices with purely numerical entries, e^matrix is the matrix exponential, defined as the infinite series:

(1)
\definecolor{darkgreen}{rgb}{0.90,0.91,0.859}\pagecolor{darkgreen} e^A=\sum_{n=0}^\infty \frac{A^n}{n!}=I+A+\frac{A^2}{2!}+\frac{A^3}{3!}+\dots

The result of the operation on the calculator is always expressed as a matrix of floating-point numbers. The matrix exponential has many applications, for example, in solving systems of linear differential equations.

Just as the usual exponential function is used in defining many other functions (general powers, logs, and trigometric and hyperbolic functions), this definition of the matrix exponential is used to define the value of a matrix equivalent of ^, ln() and log(), trig functions such as cos(), hyperbolic trig functions such as cosh(), their inverses, and some (but not all) related functions such as angle().

Other Operations on Matrices

A fair amount of math commands extend to matrices by being applied to each element; gcd() is a good example. Yet other commands behave in entirely bizarre ways. The commands SortA and SortD sort row and column vectors as though they were lists. The following list math/statistics commands act on matrices as they would on lists of lists, which results in a row vector containing the operation done on each column:

Finally, there are the commands that are meant specifically for matrices. These are found in the Matrix submenu of the MATH popup menu.

Conditionals With Matrices

Conditional statements, like If, when(), and While, accept matrices of truth values as well as single truth values. The check will be interpreted as true if and only if every element of the matrix is true, effectively combining each element of the matrix with and.

The most common way for matrices of truth values to be created is with relational operators (=, , >, , <, ) applied to matrices. They will return the single value ' false' unless both sides of the relation are matrices of equal size, in which case the matrices will be compared element by element, returning a new matrix.

Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License