Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector/vector multiplication should return a scalar #307

Closed
dfdeshom opened this issue Mar 4, 2007 · 1 comment
Closed

vector/vector multiplication should return a scalar #307

dfdeshom opened this issue Mar 4, 2007 · 1 comment

Comments

@dfdeshom
Copy link

dfdeshom commented Mar 4, 2007

Currently vector/vector multiplication returns a vector, when it should just return a scalar:

sage: b = vector([0,1,2]); u= vector([1,3,5]);
sage: u*b
(0, 3, 10)

In this particular case, the answer should just be 13

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/307

@williamstein
Copy link
Contributor

comment:1

No it shouldn't. If you want the dot product, you should do this:

sage:  b = vector([0,1,2]); u= vector([1,3,5]);
sage: b.dot_product(u)
13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants