An important set of vectors is the set of unit basis vectors given by
Where the “1” appears as the component indexed by j. Thus, we get the set ${e_0,e_1,\ldots,e_{n-1}} \subset \mathbb{R}^n$ given by
Different with unit vector, which is any vector of length one (unit length). For example, the vector $\begin{pmatrix}\frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2}\end{pmatrix}$ has length one.
Two vectors $x,y \in \mathbb{R}^n$ are equal if all their components are element-wise equal: $$x=y\\ \text{if and only if}\\ x_i = \psi_i, \text{for all}\\ 0 \le i < n$$
The AXPY operation requires 3n + 1memops(memory operations) and 2nflops(floating point operations). The reason is that $\alpha$ is only brought in from memory once and kept in a register for reuse.
A norm is a function, in our case of a vector in $\mathbb{R}^n$, that maps every vector to a nonnegative real number. The simplest example is the absolute value of a real number: Given $\alpha \in \mathbb{R}$, the absolute value of α, often written as |α|, equals the magnitude of α:
Similarly, one can find functions, called norms, that measure the magnitude of vectors. One example is the (Euclidean) length of a vector, which we call the 2-norm: for $x \in \mathbb{R}^n$,
$$\lVert x \rVert 2 = \sqrt{\sum{i=0}^{n-1}x_i^2}$$
Other norms:
1-norm (also called taxi-cab norm): $\lVert x \rVert 1 = \sqrt{\sum{i=0}^{n-1}|x_i|}$.
For $1 \le p \le \infty$, the p-norm: $\lVert x \rVert p = \sqrt[p]{\sum{i=0}^{n-1}|x_i|^p}$.
Is commutative. That is, for all vectors $x,y\in \mathbb R^n, x+y=y+x.$.
Is associative. That is, for all vectors $x,y,z\in \mathbb R^n, (x+y)+z=x+(y+z)$.
Has the zero vector as an identity. For all vectors $x \in \mathbb R^n, x+\mathbf 0=\mathbf0+x=x$ where 0 is the vector of size n with 0 for each component.