Is a vector's linear coefficients on non-orthogonal vectors equal to its projection on them?

enter image description here

Couldn't solve this question. When I went through its solution

enter image description here

They start with $$\textbf{s} = 4\textbf{p} + 3\textbf{q} + 5\textbf{r}\hspace{5pt}(i)$$ I remembered any vector, say $a$ $$\textbf{a} = x\hat{i} + y\hat{j} + z\hat{k}$$ $$ = (\textbf{a.}\hat{i})\hat{i} + (\textbf{a.}\hat{j})\hat{j} + (\textbf{a.}\hat{k})\hat{k}$$ This works because doing the dot product with (i) gives $$\textbf{a.}\hat{i} = x $$ and similarly with the other orthogonal unit vectors, but does generalize to any set of 3 vectors?
This should definitely work with all sets of orthogonal vectors even if they aren't unit ones because doing the dot product would still result in the above statement (albeit with the addition of dividing by the square of its magnitude), but what if they aren't orthogonal?
Would this still hold? because doing the above process won't cancel out the other components.


The $x=a\cdot p/||p||^2$ formula is not valid for non-orthogonal lattices. You need to introduce a reciprocal lattice. You will get $$p^*=\frac{q\times r}{p\cdot(q\times r)}$$ and similar for the $q^*$ and $r^*$ vectors. If the lattice is orthogonal, then $q\times r$ is along $p$, so we can write $$q\times r=||q\times r||\frac{p}{||p||}$$ Then $$p*=\frac{p}{||p||^2}$$ Notice that $p\cdot p^*=1$ and $q\cdot p^*=r\cdot p^*=0$. Then $$a\cdot p^*=x(p\cdot p^*)+y(q\cdot p^*)+z(r\cdot p^*)=x+0y+0z=x$$ If you want to get more information, this is the basis of crystallography. Look up reciprocal lattice.