# Using Cramer's Rule to Derive Dot Product

I'm hoping to derive an equation for the dot product using Cramer's rule. Here I'm going to try in $\mathbb{R}^2$ and will generalize once I get this first issue cleared.

I'm hoping to arrive at an expression for the dot product by first asking how to describe some vector $\mathbf{r}$ in terms of two basis vectors $\mathbf{\hat{m}}, \mathbf{\hat{n}}$. If you can, then the coefficients of the linear combination ought to be equal to the projection of $\mathbf{r}$ onto one of its basis vectors.

Thus by solving the system $$\mathbf{r} = \alpha\mathbf{\hat{m}} + \beta\mathbf{\hat{n}}$$

in the unknowns $\alpha, \beta$, I want to see that $\alpha = \mathbf{r}\cdot \mathbf{\hat{m}}$ and $\beta = \mathbf{r} \cdot \mathbf{\hat{n}}$

Using Cramer's rule and the fact that $\det A = \det A^T$, we see that

$$\alpha = \frac{ \begin{array}{|cc|} r_x & r_y \\ n_x & n_y \end{array} } { \begin{array}{|cc|} m_x&m_y\\ n_x&n_y \end{array} } \qquad \beta = \frac{ \begin{array}{|cc|} m_x & m_y \\ r_x & r_y \end{array} } { \begin{array}{|cc|} m_x&m_y\\ n_x&n_y \end{array} }$$

Now it seems that $\alpha \ne \mathbf{r}\cdot\mathbf{\hat{m}} = r_xm_x + r_ym_y = \begin{array}{|cc|} r_x & r_y \\ -m_y & m_x \end{array}$ and similarly our expectations did not hold for $\beta$.

Can someone please explain what I am misunderstanding that leads to this unexpected conclusion

• (Slightly different way of putting Matt Samuel’s answer and the ensuing comments, below). Your idea that the coordinates relative to a basis are basically projections is a good one, but you’ve overlooked the fact that in general they’re not orthogonal projections (defining orthogonality via the standard Euclidean inner product, since you’re trying to recreate it). You have, however found a way to generate other inner products on this space, and with those inner products come alternative definitions of length and orthogonality. – amd May 9 '17 at 23:12
• Wow pretty cool. I'm still in the dark about two things. Can you elaborate (1) what my alternative definitions of length and orthogonality are, (2) what this alternative inner product would be as an explicit formula, (3) under what algebraic conditions on $\mathbf{\hat{m}, \hat{n}}$ do we get that $\alpha=r\cdot m$ and $\beta = r\cdot n$? – theideasmith May 10 '17 at 0:16

• @the The dot product is generally defined by an explicit formula and is very simple. That's about as algebraic as it gets. Two vectors are orthonormal if they both have length $1$ and their dot product is $0$. – Matt Samuel May 9 '17 at 18:00