Determine the coefficients of linear combination through scalar product Let $\vec v_1,\dots,\vec v_n\in \mathbb{R}^n$, $n\ge 3$ be linearly independent vectors which are $not$ orthonormal with respect to the standard scalar product.
Let $\vec v\in \mathbb{R}^n$ be any vector $\neq 0$, I want to find the coefficients $\alpha_i\in \mathbb{R}$ such that $\vec v=\sum_{i=1}^n\alpha_i\vec v_i$. Is there a way to determine the coefficients $\alpha_i$ using the standard scalar product?
I know that if the $\vec v_i$ were orthonormal the coefficients would just be $\alpha_i=\vec v\cdot \vec v_i$. How can I fix this taking into account the non-orthogonality of the $\vec v_i$?
 A: Yes, sure: let $G= (g_{ij})_{1 \leq i,j \leq n} \doteq (\langle \vec{v}_i, \vec{v}_j\rangle)_{1 \leq i,j \leq n}$ be the Gram matrix associated to the basis $\vec{v}_1,\ldots,\vec{v}_n$. Since $\langle\cdot,\cdot\rangle$ is a non-degenerate bilinear form, $G$ is non-singular, and there exists the inverse $G^{-1} = (g^{ij})_{1 \leq i,j \leq n}$. So $$\vec{v} = \sum_{i=1}^n \alpha_i \vec{v}_i \implies \langle \vec{v},\vec{v}_j\rangle = \sum_{i=1}^n\alpha_i g_{ij} \implies \alpha_i = \sum_{j=1}^n g^{ij}\langle \vec{v}, \vec{v}_j\rangle.$$It can be a pain to compute $G^{-1}$, though. If the basis were orthonormal, then $G = G^{-1}={\rm Id}_n$ and we also get what we should get. This procedure does not require that $\langle \cdot,\cdot\rangle$ be positive-definite, being non-degenerate is enough.
A: or alternatively, you could just solve the linear system $\bf A \alpha = v$ where $\bf A$ is the matrix whose columns are the vectors $\bf v_i$, $i=1,\ldots,N$. The efficacy of this approach tends to break down with severe departure from orthonormality of the basis vectors. The advantage though, is that it avoids (or more precisely sidesteps) the issue of actually calculating the inverse of a matrix. If the departure from orthonormality is not severe, you may even be able to get by with Gaussian Elimination to solve the linear system.
