We exhibit a faithful representation of the plactic monoid of every finite rank as a monoid of upper triangular matrices over the tropical semiring. This answers a question first posed by Izhakian and subsequently studied by several authors. A consequence is a proof of a conjecture of Kubat and Okni{n}ski that every plactic monoid of finite rank satisfies a non-trivial semigroup identity. In the converse direction, we show that every identity satisfied by the plactic monoid of rank $n$ is satisfied by the monoid of $n times n$ upper triangular tropical matrices. In particular this implies that the variety generated by the $3 times 3$ upper triangular tropical matrices coincides with that generated by the plactic monoid of rank $3$, answering another question of Izhakian.