vector division?
given a vector in sage
sage: a,b=var('a,b')
sage: sv=vector(SR,[1,a,b^2])
then why is this a meaningful operation
sage: sv/sv
1
To my (utterly humble) understanding, I always thought, that if vector multiplication '*' is defined via the scalar product - as it seems to be in sage
sage: sv*sv
a^2 + b^4 + 1
then, division cannot be defined meaningfully?
[Just as a sideremark along that line: I have no problem with numpy's element wise array-arithmetic
In [1]: v=array([1.,2.,3.]) # vector
In [2]: e=array([1.,1.,1.]) # unity is a vector
In [3]: e*v == v # multiplication by unity
Out[4]: array([ True, True, True], dtype=bool)
In [5]: vi=v**(-1) # inverse is a vector
In [6]: e/v == vi # unity/vector == inverse
Out[7]: array([ True, True, True], dtype=bool)
In [8]: e == v*vi # vector * inverse == unity
Out[9]: array([ True, True, True], dtype=bool)
In my layman's world, this type of division makes perfect sense. (Moreover I'm curious why sage seems to not adopt this pythonic way of array arithmetic)]
Note that `*` is not only inner product, but also multiplication by a scalar. Indeed `2*sv` returns the expected answer. I'd say that Sage strives to give an interface that is closer to the mathematical usage, rather than the "pythonic" way. Sometimes this can be surprising, as in `sv/sv`.