We have studied the nature of the covalent bond between Pb 6s, 6p and O 2p orbitals in perovskites based on first-principles calculations. We conclude that the Pb 6p - O 2p covalent bond, not a bond involving Pb 6s, is crucial for the large ferroelectric effect in PbTiO3. The Pb 6s states behave like a shallow core level. To examine the effect of a Pb atom at the A site in the perovskite-type structure, we compared several calculated properties of PbTiO3 and BaTiO3 - the electric polarization, piezoelectric stress tensor and Young's modulus. The piezoelectric stress tensor e33 was calculated through Berry phase theory. BaTiO3 was found to have a larger e33 value than PbTiO3. In the case of BaTiO3, the response of Ti-O(2) to c-axis distortion is larger than in PbTiO3. We found that PbTiO3 is softer than BaTiO3 because of the cooperation of both Ti-O(2) and Pb-O(1) covalent bonds. We also found that the ferroelectric state is much softer than the paraelectric state. We propose that in the structural phase transition the system with the lower symmetry avoids ion repulsion through the additional degree of freedom available from atom displacement.