Reading the wikipedia dot product page I am confused by the last equation:
$A \cdot B = \sum B_i(A \cdot e_i) = \sum A_iB_i$
Specifically how is the $A \cdot e_i$ part derived? How is it substituted into that equation? Also why is $A \cdot e_i = A_i$ How is this equation related to the previous equation: $A \cdot B = A_B \|B\|$ ?