condition can be checked each time a new row of the triangular matrix is obtained. A positive semidefinite matrix is positive definite if and only if it is invertible. A matrix is negative (semi)definite if and only if is positive (semi)definite. Quadratic forms The (purely) quadratic form associated with a real matrix is the function such that for all . can be assumed symmetric by replacing it with . A symmetric matrix is positive definite if and only if its quadratic form is a strictly convex function. More generally, any quadratic function from to can be written as where is a symmetric matrix, is a real -vector, and a real constant. In the case, this is a parabola, and just like in the case, we have Theorem: This quadratic function is strictly convex, and hence has a unique finite global minimum, if and only if is positive definite. Proof: If is positive definite, then the function is strictly convex. Its gradient is zero at the unique point of , which must be the global minimum since the function is strictly convex. If is not positive definite, then there exists some vector such that , so the function is a line or a downward parabola, thus not strictly convex and not having a global minimum. For this reason, positive definite matrices play an important role in optimization problems. Simultaneous diagonalization One symmetric matrix and another matrix that is both symmetric and positive definite can be simultaneously diagonalized. This is so although simultaneous diagonalization is not necessarily performed with a similarity transformation. This result does not extend to the case of three or more matrices. In this section we write for the real case. Extension to the complex case is immediate. Let be a symmetric and a symmetric and positive definite matrix. Write the generalized eigenvalue equation as where we impose that be normalized, i.e. . Now we use Cholesky decomposition to write the inverse of as . Multiplying by and letting , we get , which can be rewritten as where . Manipulation now yields where is a matrix having as columns the generalized eigenvectors and is a diagonal matrix of the generalized eigenvalues. Now premultiplication with gives the final result: and , but note that this is no longer an orthogonal diagonalization with respect to the inner product where . In fact, we diagonalized with respect to the inner product