# Basis in a vector space

A vector space basis is the skeleton from which a vector space is built. It allows to decompose any signal into a linear combination of simple building blocks, namely, the basis vectors. The Fourier Transform is just a change of basis.

A vector basis is the linear combination of a set of vector that can write any vector of the space.

$w^{(k)} \leftarrow \text{basis}$

The canonical basis in $$\mathbb{R}^2$$ are:

$$e^{(0)} = [1, 0]^T \ \ e^{(1) } = [0,1]^T$$

Nevertheless, there are more basis for $$\mathbb{R}^2$$:

$$e^{(0)} = [1, 0]^T \ \ e^{(1) } = [1,1]^T$$

This former basis is not linearly independent as information of $$e^{(0)}$$ is inside $$e^{(1)}$$.

## Formal definition

H is a vector space.

W is a set of vectors from H such that $$W = \left\{ w^{(k)} \right\}$$

W is a basis of H if:

1. We can write $$\forall x \in H$$: $$x = \sum_{k=0}^{K-1} \alpha_k w^{(k)}, \ \ \alpha_k \in \mathbb{C}$$
2. $$\alpha_k$$ are unique, namely, there is linear independence in the basis, as a given point can only be expressed in a unique combination of the basis.

Orthogonal basis are those which inner product returns 0:

$$\left \langle w^{(k)}, w^{(n)} \right \rangle = 0, \ \ \text{for } k \neq n$$

In addition, if the self inner product of every basis element return 1, the basis are orthonormal.

## How to change the basis?

An element in the vector space can be represented with a new basis computing the projection of the current basis in the new basis. If $$x$$ is a vector element and is represented with the vector basis $$w^{(K)}$$ with the coefficients $$a_k$$, it can also be represented as a linear combination of the basis $$v^{(k)}$$ with the coefficients $$\beta_k$$. In a mathematical notation:

$x = \sum_{k=0}^{K-1} \alpha_k w^{(k)} = \sum_{k=0}^{K-1} \beta_k v^{(k)}$

If $$\left\{ v^{(k)} \right\}$$ is orthonormal, the new coefficients $$\beta_k$$ can be computed as a linear combination of the previous coefficients and the projection of the new basis over the original one:

$\beta_h = \left \langle v^{(h)}, x \right \rangle = \left \langle v^{(h)}, \sum_{k=0}^{K-1} \alpha_k w^{(k)} \right \rangle = \sum_{k=0}^{K-1} \alpha_k \left\langle v^{(h)}, w^{(k)} \right \rangle$

This operation can also be represented in a matrix form as follows:

$\beta_h = \begin{bmatrix} c_{00} & c_{01} & \cdots & c_{0\left(K-1 \right )}\\ & & \vdots & \\ c_{\left(K-1 \right )0} & c_{\left(K-1 \right )01} & \cdots & c_{\left(K-1 \right )\left(K-1 \right )} \end{bmatrix}\begin{bmatrix} \alpha_0 \\ \vdots \\ \alpha_{K-1} \end{bmatrix}$

This operation is widely used in algebra. A well-known example of a change of basis could be the Discrete Fourier Transform (DFT).