(I'm using Eigen C++ library)
I need to solve a system of equations with the form of Ax = 0
in order to find the x
vector (A is sparse).
EDIT: A is SPD (symmetric positive definite)
Because some of the x
values are known, I removed them out of A to create Af
and into another matrix Ac
with the same dimensions as A
, and multiplied -Ac
with a vector that has the known x
values and zeros in all other places to create a vector b
.
Now I try to solve Af * x = b
using SparseLU<SparseMatrix<float>>
, but it fails because the factorization doesn't work. I get this error:
THE MATRIX IS STRUCTURALLY SINGULAR ... ZERO COLUMN AT 480
Why is it a problem that I have a zero column? A zero row would have been a problem for sure but a zero column? I just changed something like this:
x_1 + x_2 = 0
x_2 = 3
to
x_1 + 0 = -3
The solution is x_1 = -3 & x_2 = 3
even though I would have had a zero column had I put the equations in a matrix.
How can I solve this problem?