ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 29 Nov 2013 18:49:42 +0100Yet another linear combinationhttps://ask.sagemath.org/question/10791/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 BubusetteteFri, 29 Nov 2013 18:49:42 +0100https://ask.sagemath.org/question/10791/