In physics we think of vectors as directions that move us through space. In computer science the term of a vector is generalized and denotes just a collection of attributes of an object (elements could be of different units). ^3fbd00
$
\text{house} =
\begin{bmatrix} 120 \text{ sqm} \\ 4 \text{ rooms} \\ 150 \text{ k€} \end{bmatrix} =
\begin{bmatrix} 120 \\ 4 \\ 150 \end{bmatrix}
$
**Vector addition:** We can add vectors of the same shape to each other in any order. Vector subtraction is like addition of a negative vector.
$
r = \begin{bmatrix} 3 \\ 2 \end{bmatrix}, \quad
s = \begin{bmatrix} -1 \\ 2 \end{bmatrix}, \quad
r+s = \begin{bmatrix} 3-1 \\ 2+2 \end{bmatrix} =\begin{bmatrix} 2 \\ 4 \end{bmatrix}
$
![[vector-addition.png|center|200]]
**Vector multiplication:** The multiplication with a scalar is being done element-wise.
$
r = \begin{bmatrix} 3 \\ 2 \end{bmatrix}, \quad
a*r = \begin{bmatrix} 3a \\ 2a \end{bmatrix} $
![[vector-multiplication.png|center|250]]
**Coordinate system:** The vectors $e_i$ and $e_j$ are the basis vectors of the coordinate system. We always define a vector in terms to steps into the direction of the basis vectors.
$
e_i = \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \quad
e_j = \begin{bmatrix} 0 \\ 1 \end{bmatrix}
$
![[basis-vectors.png|center|300]]
$ r = 3e_i+2e_j =
3*\begin{bmatrix} 1 \\ 0 \end{bmatrix} + 2* \begin{bmatrix} 0 \\ 1 \end{bmatrix} =\begin{bmatrix} 3 \\ 2 \end{bmatrix}
$