I have two matrices A, B. A relates to a physical system and all of its eigenvalues have negative real parts. B is a diagonal matrix with nonzero and unequal elements on its diagonal, which are in fact its eigenvalues. Let's say A and B are 5 by 5 and I want to know about eigenvalues of A*B. If for example 2 elements of B are negative and the rest are positive, can I say that 2 eigenvalues of A*B have positive real parts, and other eigenvalues of A*B have negative real parts ? I tried with different choices of A and B, and this thing held for all of them [seems like sign of eigenvalues of A and B are multiplied by each other in A*B], so I thought that there might be a proof or theory about it ! Can anybody help me ?

What would be true is the following: suppose $A$ is symmetric and negative definite, and let $(-A)^{1/2}$ be the positive definite square root of $-A$. Then by Sylvester's Law of Inertia, the numbers of positive and negative eigenvalues of $(-A)^{1/2} B (-A)^{1/2}$ are equal to the corresponding numbers for $B$; but the eigenvalues of $(-A)^{1/2} B (-A)^{1/2}$ are equal to the eigenvalues of $-AB$, so the number of positive (resp. negative) eigenvalues of $AB$ is equal to the number of negative (resp. positive) eigenvalues of $B$.

EDIT: Here is a $3 \times 3$ counterexample where $A$ is not symmetric. Take $$ A = \pmatrix{ -8.2 & 1 & 1\cr -45 & -3 & 0\cr 0 & 8.3 & 5.3\cr},\ B = \pmatrix{2 & 0 & 0\cr 0 & -1 & 0\cr 0 & 0 & -2\cr}$$ Then $A$ has eigenvalues $-3, -2.2, -0.7$, and $B$ has one positive and two negative eigenvalues, but $AB$ has one negative real eigenvalue (approximately $-23.9$) and two complex eigenvalues with negative real part (approximately $-.0432 \pm .878 i$).