The article utilizes HyperChem 8.0 Release software to optimize the geometric structures and calculate the electron density of substituted pyridine heterocycles. This is done to predict the reactivity and orientation of second substituent groups on the pyridine heterocycle. The results indicate that electron-donating groups direct electrophilic substitution to the ortho and para positions relative to them. In contrast, nucleophilic substitution occurs at the 2 and 6 positions relative to the nitrogen atom. For electron-withdrawing groups, electrophilic substitution takes place at the 3 and 5 positions (relative to nitrogen), while nucleophilic substitution still occurs at the 2 and 6 positions.