A matrix is a representation of a linear map with respect to any basis of vectors of our choice. We often deal with matrices with respect to the standard cartesian basis, (1,0,0) (0,1,0) (0,0,1), but we can write a matrix in any basis that we like. The numbers in the matrix tell us where each one of our basis vectors is sent. When we diagonalise a matrix, we simply choose a basis so that each vector is sent to some scalar multiple of itself. Well, this is precisely the definition of an eigenvector! and the entries of the matrix are the eigenvalues! so to diagonlise a matrix we just need to find its eigenvalues and insert them on the diagonal.