Linear Algebra: Inner Products and Basis

inner-productslinear algebra

To evaluate an Inner Product, do we use the coordinates of the vectors (like we do for Norms) or the vectors themselves (in the absolute sense)?

For example, consider the space of polynomials up to 3rd degree with basis : [1, x, x^2, x^3].

Is the following true? The coordinates of the basis vector "x" in R4 is: [0 1 0 0]'.

If we define the inner product in this space to be an integral, I have seen that in the inner products of the basis vectors (say x and x^2), the basis vectors themselves are used, and not their coordinates.

Thanks

Edit: I think I am getting tripped up because I am normally used to the Dot Product, where the basis is generally the unit vectors, and so the coordinates of the vectors are just the vectors themselves.

Best Answer

If you have an ordered basis $e_1,\dots,e_n$ and $v = a_1e_1 + \dots a_ne_n$ then the associated matrix is $[a_1,\dots,a_n]^\top$ (let's say it's a column vector). So for example $x = 0e_1 + 1e_2 + 0e_3 + 0e_4$ then the associated coordinates vector is $[0,1,0,0]^\top$ as you say.

Next, if you have an inner product and you want to describe that inner product in coordinates, you form the Gram matrix $G = [\langle e_i, e_j \rangle]_{i,j=1}^n$. For example if $\langle v, w \rangle = \int_0^1 vw \;dx$ then we have $$ \langle x^m, x^n \rangle = \frac{1}{1 + m + n} $$

So that gives us the Gram matrix $$G = \begin{bmatrix} 1 & \frac12 & \frac13 & \frac14 \\ \frac12 & \frac13 & \frac14 & \frac15 \\ \frac13 & \frac14 & \frac15 & \frac16 \\ \frac14 & \frac15 & \frac16 & \frac17 \end{bmatrix}. $$ The way this works is that if $v, w$ are polynomials, whose coordinate vectors I call $[v]$ and $[w]$ then $$\bbox[5px,border:2px solid red]{\langle v, w \rangle = [v]^\top G [w].} $$

For example: $$ \langle x, x^2 \rangle = \begin{bmatrix} 0 & 1 & 0 & 0 \end{bmatrix} G \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \end{bmatrix} \begin{bmatrix} \frac13 \\ \frac14 \\ \frac15 \\ \frac16 \end{bmatrix} = \frac14. $$

Recall that multiplying a matrix on the right by $[e_i] = [0,\dots,1,\dots,0]^\top$ gives you the $i$-th column of that matrix and multiplying on the left by $[e_i]^\top = [0,\dots,1,\dots,0]$ gives you the $i$-th row.

Related Question