An introduction to the theory of canonical matrices