# Linear Algebra (Lec03)

## yukita@k.hosei.ac.jp

### •System of Linear Equations

### •Matrix

The following command will change the default output format so that we get matrix output in a conventional manner.

If we input a 1-dim list, the system automatically convert it to a column vector.

I do not like this feature. There is no way to distinguish a column vector from a row vector in Mathematica. For example, let us evaluate the following expression.

We see that the system treated the list {x,y,z} as a row vector, performed the usual matrix multiplication, and finally converted the result to a column vector. How confusing!

### •Elementary Row Operations

The RowReduce function performs Gaussian elimination.

Let us do this step by step.

Which of the following definitions is better?

If you want to use the above definition, do not evaluate the next cell.

### •Add-on package

This takes the submatrix between the element at position{2, 3}and the element at position{4, 4}.The same result is obtained withTake[mat, {2, 4}, {3, 4}]ormat[[{2, 3, 4}, {3, 4}]].

Here is the same submatrix,specified as a3×2matrix starting with the element at position{2, 3}.

### •Exercises

#### •Problem 1

Define the **multCol**

function which does the same task as **multRow**

except that the operation is on the columns rather than rows. Define also the **addCol**

function.

##### •Solution

Converted by *Mathematica*
(April 21, 2003)