Ask Your Question

symbolic vector norm

asked 2012-03-19 10:25:19 -0500

calc314 gravatar image

I can't get Sage to produce the norm or even just compute w[1]^2 in the code below. I keep getting a "not implemented" error. Have I made a simple mistake here, or is there a way around this? Thanks for the help. I haven't done much with matrix computations in Sage yet and am trying to learn my way around.

edit retag flag offensive close merge delete


This is an error in symbolic matrices (v.column() makes w a symbolic matrix, not a symbolic vector). I've opened a ticket here:

Jason Grout gravatar imageJason Grout ( 2012-03-22 21:53:46 -0500 )edit
mforets gravatar imagemforets ( 2017-04-11 04:50:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2012-03-19 11:15:18 -0500

achrzesz gravatar image
sage: var('x,y')              
(x, y)
sage: a=matrix([[1,2],[-3,0]])
sage: v=vector([x,y])         
sage: w=a*v                   
sage: w.norm()                
sqrt(abs(x + 2*y)^2 + abs(-3*x)^2)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-03-19 10:25:19 -0500

Seen: 2,231 times

Last updated: Mar 19 '12