Prove that if for every $x \in \mathbb{R}^N$ $Ax=Bx$ then $A=B$ How can I quickly prove that if for every $x \in \mathbb{R}^N$
$$Ax=Bx$$ then $A=B$ ? Where $A,B\in \mathbb{R}^{N\times N}$.
Normally I would multiply both sides by inverse of $x$, however vectors have no inverse, so I am not sure how to prove it.

If you want to invert a matrix but all you have are vectors, put the vectors into a matrix! For example,
$$A \left( e_1 \mid e_2 \mid \cdots \mid e_n \right) = \left( A e_1 \mid A e_2 \mid \cdots \mid A e_n \right) $$
where $e_i$ is the $i$-th standard basis (column) vector. I could have chosen any vectors, but the standard basis vectors are the simplest, and I chose a linearly independent set so as to get the most information out of doing this. Also, the matrix wouldn't be invertible if I had chosen a linearly dependent set.
It turns out we don't even need to bother with inverting in this case, since we've pooled the vectors into an identity matrix:
$$ \begin{align}
A &= A(e_1 \mid e_2 \mid \cdots \mid e_n)
\\&= (Ae_1 \mid Ae_2 \mid \cdots \mid Ae_n)
\\&= (Be_1 \mid Be_2 \mid \cdots \mid Be_n)
\\ &= B(e_1 \mid e_2 \mid \cdots \mid e_n)
\\ &= B\end{align} $$
