Splitting an Indefinite Matrix into 2 definite matrices I'm attempting to use some quadratic programming techniques to solve a particular optimization problem and my chosen Objective Function is indefinite.
I've found some texts online which regard splitting the objective function into two components of which one is positive semi-definite and one is negative semi-definite.
All these concerns aside, my question becomes this:
If an nxn matrix Q is indefinite, is there an algorithm which produces matrices A, and B, both nxn such that A and B are both positive semidefinite and Q = A - B?
Thanks,
James

I suppose that your matrix is symmetric. Note that a symmetric matrix can always be diagonalized.
Say, $PQP^{-1}=D$ where $D$ is diagonal.
You can take $PAP^{-1}$ to be the diagonal matrix consisting of all positive entries in $D$ and $0$ in rest of the places, and $PBP^{-1}=D-PAP^{-1}$.
