The vibrational properties and electronic structures of PbTiO3 and BaTiO3 crystals were investigated by density functional theory. The calculation result indicates the ferroelectric instabilities of cubic PbTiO3 and BaTiO3 are derived from the hybridization between the Ti3d and O2p orbitals. The difference in the ferroelectric phase transition sequence of PbTiO3 and BaTiO3 is from their different tetragonal strain. For PbTiO3, the Pb6s orbital bonds with O2p orbital effectively, which results in large tetragonal strain and stabilizes its tetragonal phase. For BaTiO3, the barium atom is strongly ionic, and its tetragonal strain is rather small, and it can still undergo other low-temperature ferroelectric phase transition.