Derive formula for calculating weights in linear combinations

linear algebralinear-transformationsorthogonalityvector-spaces

Weights in the linear combination:

If $\{u_{1}, u_{2}, … , u_{p}\}$ be an orthogonal basis for a subspace $W$ of $R^{n}$
, then for each $y$ in $W$, the weights for the linear combination $y = c_{1}.u_{1} + ⋯ + c_{p}.u_{p}$ can be defined as
$$c_{j} = \frac{y.u_{j}}{u_{j}.u_{j}} \qquad j=1,2, … ,p$$

I understood the geometrical interpretation of the above formula, but I want to know how to derive the above equation.

Best Answer

Since $y\in W$ and $\{u_{1}, u_{2}, ... , u_{p}\}$ form a basis for $W$, it is possible to write $y$ as a linear combination of $u_{1}, u_{2}, ... , u_{p}$: $$ y = c_{1}u_{1} + ⋯ + c_{p}u_{p} = \sum_{i=1}^{p}c_{i}u_{p} $$ Take dot product on both sides with respect to $u_j$: $$ \begin{align} y\cdot u_j &= \left[ \sum_{i=1}^{p}c_{i}u_{p}\right] \cdot u_{j}\\ &= \sum_{i=1}^{p}c_{i}u_{i}\cdot u_{j} \end{align} $$ Since $\{u_{1}, u_{2}, ... , u_{p}\}$ are also orthogonal, $u_{i}\cdot u_{j} = 0$ when $i\neq j$ and $$ y\cdot u_j = c_{j}u_{j}\cdot u_{j}\\ \Rightarrow c_{j} = \dfrac{y\cdot u_j}{u_{j}\cdot u_{j}} $$

Related Question