I am trying to follow the following reasoning: Given a known matrix A, we want to find w that maximizes the quantity w'Aw (where w' denotes the transpose of w) subject to the constraint w'w = 1. To do so, use a lagrange multiplier, L: w'Aw + L(w'w - 1) and differentiate to obtain Aw = Lw. Thus, we seek the eigenvector of A with the largest eigenvalue. I do not understand how they differentiated w'Aw + L(w'w-1) to get Aw = Lw. Can someone explain to me what is going on at that step?