Hello,

I am trying to use Sage in my class with some basic problems about 
matrices. Several of the problems in the book are of the form “find all 
values of k such that … is consistent” where the … is some linear system 
where k appears. If doing these problems by hand, one would take the 
determinant and solve for the values of k where the determinant is not 
zero. Sometimes the linear system is large, so I want to be able to use the 
.determinant() command (or .echelon_form() for similar problems) on a 
matrix where k is an element. However, Sage is not letting me create such a 
matrix object, because it does not recognize my assume() command telling it 
that the variable k is rational (or real, for that matter; neither works). 

I’m trying to mimic what is going on here:
http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/assumptions.html

When I type the following code, I get an error saying Sage is "unable to 
convert k to an element of a rational field" (I get this error with and 
without the assume())

var('k')
assume(k,'rational')
v = vec(QQ,[k,k,k])

Can someone please tell me how to make variables and matrices play nicely 
together?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to