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.
 A: Suppose you plug in $x = (1,0,0,\dots,0)$ (written as a column vector).  What does that tell you about $A$ and $B$?  It doesn't tell you that $A = B$, but it does tell you that the (fill in the blank) of $A$ is the same as the (fill in the blank) of $B$.  Based on this observation, find some other choices of $x$ that will allow you to conclude that $A = B$.
A: 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} $$
A: Hint: If $\{e_1,...,e_N\}$ is the standard ordered basis for $\Bbb R^N$, then (for example) $Ae_j$ is the $j$th column of $A$.
A: I think it's better to think of what's given as a definition of $A = B$ (since linear maps are isomorphic to matrices by understanding multiplying column matrices as evaluating on vectors).  But otherwise, as others suggested, it's also easy to see that $A = AI = BI = B$, where $I$ is the identity matrix by "cooking up" $I$ for each column.
A: Let $M=$ be a basis of $\mathbb{R}^N$. For $A,B\in\mathbb{R}^{N\times N}$, consider the associated linear maps $\phi_A: x \mapsto Ax$ and $\phi_B: x \mapsto Bx $. A linear map is uniquely determined by its values on the basis vectors, so it follows from
$$ Ax = Bx \quad\forall x\in\mathbb{R}^N$$
that $\phi_A = \phi_B$ as both maps coincide on $M$. 
Now, having chosen $M$ as a basis of $\mathbb{R}^N$, we get an isomorphism $$\operatorname{End}_{\mathbb{R}}(\mathbb{R}^N)\rightarrow \mathbb{R}^{N\times N},$$
so $A=B$.

Alternatively, for a less algebraic approach, show that the zero matrix is the only matrix $A$ for which
$$Ax = 0 \quad \forall x\in\mathbb{R}^N$$
holds.
