0

This is possibly a dumb question, but I'm trying to solve a linear system, say

Ax=b

A is a negative semi-definite matrix. I am using a math library, and want to use a method that only works for positive semi-definitive matrices. Could I simply just multiply -1 to both sides and then solve:

Dx=f

where

D=-A
f=-b

D now becomes positive semi definite.

24n8
  • 1,455

1 Answers1

0

A matrix $A$ is negative semidefinite if and only if $x^T A x \leq 0$ for all $x$. Then for any $x$, $x^T (-A) x = - x^T A x \geq 0$ so $-A$ is positive semidefinite. Thus, your library for positive semidefinite matrices will work for solving the system $D x = f$.

Moreover, by multiplying both sides by $-1$, any solution to $A x = b$ is also a solution to $D x = f$. Similarly, any solution to $D x = f$ is also a solution to $A x = b$ so they both have the same set of solutions. Therefore, solving $D x = f$ is equivalent to solving $A x = b$.

Qudit
  • 3,221