Mathematica has several built-in commands to help with linear algebra. First we need to know how to input a matrix. This is done by describing the matrix as a list of lists.
![[Graphics:Images/chapter1_gr_1.gif]](Images/chapter1_gr_1.gif)
You can view the matrix in a rectangular array as follows.
![[Graphics:Images/chapter1_gr_3.gif]](Images/chapter1_gr_3.gif)
Row vectors and column vectors can be entered as appropriate matrices.
![[Graphics:Images/chapter1_gr_5.gif]](Images/chapter1_gr_5.gif)
![[Graphics:Images/chapter1_gr_7.gif]](Images/chapter1_gr_7.gif)
![[Graphics:Images/chapter1_gr_9.gif]](Images/chapter1_gr_9.gif)
![[Graphics:Images/chapter1_gr_11.gif]](Images/chapter1_gr_11.gif)
Another way to describe a column vector is as the transpose of a row vector. This might be easier to input.
![[Graphics:Images/chapter1_gr_13.gif]](Images/chapter1_gr_13.gif)
![[Graphics:Images/chapter1_gr_15.gif]](Images/chapter1_gr_15.gif)
Mathematica understands that v2 and v3 are the same.
![[Graphics:Images/chapter1_gr_17.gif]](Images/chapter1_gr_17.gif)
Mathematica understands multiplication of a matrix by a vector using the following syntax.
![[Graphics:Images/chapter1_gr_19.gif]](Images/chapter1_gr_19.gif)
Scalar multiplication can also be easily accomplished using the * or a blank space. But be careful using the space because you can't always easily tell that its there. So 3 c and 3c are interpreted differently in Mathematica -- the latter being the name of a new variable.
![[Graphics:Images/chapter1_gr_22.gif]](Images/chapter1_gr_22.gif)
For a few examples, here are some of the Test 1 problems worked out in Mathematica.
![[Graphics:Images/chapter1_gr_24.gif]](Images/chapter1_gr_24.gif)
![[Graphics:Images/chapter1_gr_26.gif]](Images/chapter1_gr_26.gif)
![[Graphics:Images/chapter1_gr_28.gif]](Images/chapter1_gr_28.gif)
![[Graphics:Images/chapter1_gr_30.gif]](Images/chapter1_gr_30.gif)
![[Graphics:Images/chapter1_gr_32.gif]](Images/chapter1_gr_32.gif)
![[Graphics:Images/chapter1_gr_34.gif]](Images/chapter1_gr_34.gif)
![[Graphics:Images/chapter1_gr_36.gif]](Images/chapter1_gr_36.gif)
![[Graphics:Images/chapter1_gr_38.gif]](Images/chapter1_gr_38.gif)
![[Graphics:Images/chapter1_gr_40.gif]](Images/chapter1_gr_40.gif)
![[Graphics:Images/chapter1_gr_42.gif]](Images/chapter1_gr_42.gif)
![[Graphics:Images/chapter1_gr_44.gif]](Images/chapter1_gr_44.gif)
![[Graphics:Images/chapter1_gr_46.gif]](Images/chapter1_gr_46.gif)