  Exact diagonalization is a powerful numerical method to study isolated
quantum many-body systems. This paper provides a review of numerical algorithms
to diagonalize the Hamiltonian matrix. Symmetry and the conservation law help
us perform the numerical study efficiently. We explain the method to
block-diagonalize the Hamiltonian matrix by using particle number conservation,
translational symmetry, particle-hole symmetry, and spatial reflection symmetry
in the context of the spin-1/2 XXZ model or the hard-core boson model in a
one-dimensional lattice. We also explain the method to study the unitary time
evolution governed by the Schr\"odinger equation and to calculate thermodynamic
quantities such as the entanglement entropy. As an application, we demonstrate
numerical results that support that the eigenstate thermalization hypothesis
holds in the XXZ model.
