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

Matrix multiplication and General Documentation #64

Closed
anurupmitra opened this issue May 11, 2018 · 3 comments
Closed

Matrix multiplication and General Documentation #64

anurupmitra opened this issue May 11, 2018 · 3 comments

Comments

@anurupmitra
Copy link

Hi,
I'm probably being very silly somewhere but I can't figure out how to multiply 2 matrices. I tried this :

Algebrite.run('A=[[a,b],[c,d]]');
Algebrite.run('C=[[x],[y]]');
Algebrite.run('A*C')

and got this:

[[x],[y]] [[a,b],[c,d]]

That looks like the two different matrices have been output?

Also, it would be super if the documentation could reflect the current version on Github!

Thanks and Regards
Anurup

@davidedc
Copy link
Owner

dot(A,C) should do the trick. Can't use * because the engine considers * always to be commutative, which dot product isn't. (In fact, actually, in your result the order of the matrices is switched). Closing this issue for now, feel free to re-open if you find further issues.

@davidedc
Copy link
Owner

@anurupmitra
Copy link
Author

This is great! Thanks!

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

No branches or pull requests

2 participants