A square matrix can be diagonalized even if not all eigenvalues are distinct. To achieve this, one must identify the eigenspaces and establish a basis for them. If the basis vectors from the eigenspaces span the entire space, the matrix is diagonalizable. The diagonal matrix can be constructed using these basis eigenvectors. Therefore, diagonalization is feasible under these conditions.