We review our recently developed methods for large-scale electronic structure calculations, both in one-electron theory and many-electron theory. The method are based on the density matrix representation, together with the Wannier state representation and the Krylov subspace method, in one-electron theory of a-few-tens nm scale systems. The hybrid method of quantum mechanical molecular dynamical simulation is explained. The Krylov subspace method, the CG (conjugate gradient) method and the shifted-COCG (conjugate orthogonal conjugate gradient) method, can be applied to the investigation of the ground state and the excitation spectra in many-electron theory. The mathematical foundation of the Krylov subspace method for large-scale matrix computation is focused and the key technique of the shifted-COCG method, e.g. the collinear residual and seed switching, is explained. A wide variety of applications of these extended novel algorithm is also explained. These are the fracture formation and propagation, liquid carbon and formation process of gold nanowires, together with the application to the extend Hubbard model.