Prove using Lagrange Multiplier Method that

where A is a diagonal matrix whose diagonal entries are the eigenvalues.
Note A=(P^-1)TP where T is an orthogonally diagonalizable linear operator.