Understanding Lie groups G_2 and F_4 through the octonions