Matrix Multiplication

41 views
Skip to first unread message

Peter Luschny

unread,
Dec 13, 2018, 10:59:27 AM12/13/18
to sage-support
From Sage Quick Reference: Linear Algebra, Robert A. Beezer:

Matrix Multiplication
    u = vector(QQ, [1,2,3]), v = vector(QQ, [1,2])
    A = matrix(QQ, [[1,2,3],[4,5,6]])
    B = matrix(QQ, [[1,2],[3,4]])
    u*A, A*v, B*A, B^6, B^(-3) all possible 

----
However u*A or A*v give:
TypeError: unsupported operand parent(s) for *: 'Vector space 
of dimension 3 over Rational Field' and 'Full MatrixSpace of 
2 by 3 dense matrices over Rational Field'

SageMath version 8.4, Release Date: 2018-10-17

Dima Pasechnik

unread,
Dec 13, 2018, 12:54:30 PM12/13/18
to sage-support
looks like a typo in Rob's Quick Reference to me.
>
> SageMath version 8.4, Release Date: 2018-10-17
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages