Ask Your Question

symbolic vector norm

asked 2012-03-19 16:25:19 +0200

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-23 03:53:46 +0200 )edit
mforets gravatar imagemforets ( 2017-04-11 11:50:37 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2012-03-19 17:15:18 +0200

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 16:25:19 +0200

Seen: 6,653 times

Last updated: Mar 19 '12