# Vector Operations

A matrix with only one column is called a column vector, or simply a vector. For example, and are vectors. Then we can define the addition  '' of two vectors, and the multiplications  '' of a vector with a real number , in which is called a scalar. For example,

and

In Matlab/Octave we can set a new vector in either of the following forms:

> u = [1; -2; -5]

> u = [1 -2 -5]'
If you type only u = [1 -2 -5]'', it gives a row'' instead of a column.'' Then the apostrophe (') must be attached, which does a transposition. You can add a vector and multiply it by a scalar as follows:
> u + v

> 5 * u

EXAMPLE 1. Given and , find , , and .

The following vectors and are called a 2-dimensional and 3-dimensional vector, respectively.

and in general.

A vector  with  real numbers is called an n-dimensional vector. We often call it simply a vector in .''

Subsections

Department of Mathematics