Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a set of linear equations which follow this shape:

A0 + A11.X1 + A12.X2 + .... + A1n.Xn = 0
A0 + A21.X1 + A22.X2 + .... + A2n.Xn = 0
.
.
.
A0 + An1.X1 + An2.X2 + .... + Ann.Xn = 0

I'm trying to solve them using a python null space vector since it might have an infinite number of solutions.

as an example of what this matrix might contain, i created a matrix which should give some known results (at least that's what i thought) but the problem is that it's not giving the results that i thought it should give.

example matrix:

[[-1  0  0  0 15 15  0]
 [-1  0  0  0 15 15  0]
 [-1  0  0  0 15 15  0]
 [-1 15 15 15  0  0  0]
 [-1 15 15 15  0  0  0]]

so in this case the result should be that the first three values (X1, X2 and X3) should be equal and the last two values should be also equal (X4 and X5).

A0 = -1 and the right 0 column is the after equal value.

the result is something like that:

linalg.solve null space solution

[[  9.98100179e-01   1.02954327e-02   1.26714733e-17]
 [  3.06017422e-02  -8.16224359e-01   1.92838644e-16]
 [  1.79691349e-02   4.08455361e-01  -7.07106781e-01]
 [  1.79691349e-02   4.08455361e-01   7.07106781e-01]
 [  3.32700060e-02   3.43181088e-04   4.22382445e-19]
 [  3.32700060e-02   3.43181088e-04   4.22382445e-19]
 [  0.00000000e+00   0.00000000e+00   0.00000000e+00]]

if i put the values from the null space solution inside the equations, i get 0 = 0 which should be correct, but i think that the equal values in the matrix should give equal results. (P.S: first row in the solution is for A0 and last row is for 0)

so my question would be, are my prediction correct and the null space vector of solution generated from python is giving wrong answers?? or my prediction of the result is totally wrong?? because i'm really lost in the mathematics algebra in here.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.