Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yet another linear combination

Hi, I'm really new to Sage and to programming in general. I have 20 linear independent vectors of length 20, and a linear dependent vector. I would like to write this one as a linear combination of the others: I looked up on the internet all day, but nothing I found worked. The ways I tried are:

  • define a vector space of dim 20 on the field I'm using, impose my vectors as a base, and use the method .coodinates(). PROBLEM: I couldn't impose the basis, I didn't find a command to do so.

  • use G.solve_right(s), where G is a 20x20 matrix and s is my linear dependent vector. I thought I would have a vector as an output but instead I get something of dimension 20x8. Weird.

  • I tried to do a linear system directly using equations with the vectors, in order to solve them with respect to some variables, but I got as an output that you can't do it using vectors.

So, what shall I try? Thank you very much Celeste

Yet another linear combination

Hi, I'm really new to Sage and to programming in general. I have 20 linear independent vectors of length 20, and a linear dependent vector. I would like to write this one as a linear combination of the others: I looked up on the internet all day, but nothing I found worked. The ways I tried are:

  • define a vector space of dim 20 on the field I'm using, impose my vectors as a base, and use the method .coodinates(). PROBLEM: I couldn't impose the basis, I didn't find a command to do so.

  • use G.solve_right(s), where G is a 20x20 matrix and s is my linear dependent vector. I thought I would have a vector as an output but instead I get something of dimension 20x8. Weird.

  • I tried to do a linear system directly using equations with the vectors, in order to solve them with respect to some variables, but I got as an output that you can't do it using vectors.

So, what shall I try? Thank you very much Celeste

click to hide/show revision 3
retagged

Yet another linear combination

Hi, I'm really new to Sage and to programming in general. I have 20 linear independent vectors of length 20, and a linear dependent vector. I would like to write this one as a linear combination of the others: I looked up on the internet all day, but nothing I found worked. The ways I tried are:

  • define a vector space of dim 20 on the field I'm using, impose my vectors as a base, and use the method .coodinates(). PROBLEM: I couldn't impose the basis, I didn't find a command to do so.

  • use G.solve_right(s), where G is a 20x20 matrix and s is my linear dependent vector. I thought I would have a vector as an output but instead I get something of dimension 20x8. Weird.

  • I tried to do a linear system directly using equations with the vectors, in order to solve them with respect to some variables, but I got as an output that you can't do it using vectors.

So, what shall I try? Thank you very much