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

A = \left[\begin{array}
 1&2&3\  4&5&6

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

B = \left[\begin{array}
 7\ 8

like this:
  B = [7;8]
Now suppose you want the augmented matrix $[A\, B]$. You can enter it like so:
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