Vector Operations
Vectors and Their 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 “
and
EXAMPLE 1.
(This demonstration requires
arrow.m
to draw vectors as in the plot below.)
Given
and
,
find
and
.
n-Dimensional Vectors.
The following vectors
and
are called a 2-dimensional and 3-dimensional vector, respectively.
in general. Matlab/Octave. 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
© TTU Mathematics