TITLE: Can every group be represented by a group of matrices?
QUESTION [54 upvotes]: Can every group be represented by a group of matrices?

Or are there any counterexamples? Is it possible to prove this from the group axioms?

REPLY [12 votes]: Finitely generated linear groups are residually finite. This is a deep result, due to Mal'cev (see here for a sketch proof), and it allows you to conjure up non-linear groups willy-nilly.
For example, the Baumslag-Solitar group $$BS(2, 3)\cong \langle a, t\mid t^{-1}a^2t=a^3\rangle$$
is non-residually finite, and hence non-linear.
The proof that it is non-residually finite is not hard, and comes from combining the following two results.
A group $G$ is Hopfian is every surjective endomorphism $G\twoheadrightarrow G$ is injective.

$BS(2, 3)$ is non-Hopfian, as the map $a\mapsto a^2, t\mapsto t$ extends to a surjective but non-injective homomorphicm (see here).
Residually finite groups are Hopfian (see here).

The question you are now asking is, of course, "are all finitely generated residually finite groups linear?". Well...no. There is a paper of Cornelia Drutu and Mark Sapir, where they prove that the group $$\langle a, t\mid a^{(t^2)}=a^2\rangle$$ is residually finite but non-linear.