next up previous
Next: Linear Systems Up: Warmup Previous: Warmup

Entering Matrices

To get started, let's try to get a matrix into the computer, and do something with it. You can enter the matrix

\begin{displaymath}
A = \left[\begin{array}
{rrr}
 1&2&3\  4&5&6
 \end{array}\right]\end{displaymath}

like this
  A = [1,2,3;4,5,6]
Notice that a semicolon is used to separate the two rows. You can enter the column vector

\begin{displaymath}
B = \left[\begin{array}
{r}
 7\ 8
 \end{array}\right]\end{displaymath}

like this:
  B = [7;8]
Now suppose you want the augmented matrix $[A\, B]$. You can enter it like so:
  [A,B]
Notice the use of a comma to tack on a new column. If you were appending a row to a matrix, you'd use a semicolon instead.



Frank Beatrous
1/20/1998