Here's the simplest way to see it:
1. We know that two vectors a and b are orthogonal if and only if <a,b> = 0.
2. We can see that <e1, a2 - <a2,e1>e1> = <e1,a2> - <e1,<a2,e1>e1> = <e1,a2> - <a2,e1><e1,e1> = <e1,a2> - <a2,e1> = <e1,a2> - <e1,a2> = 0
3. Therefore, e1 and a2 - <a2,e1>e1...