You need for P to be a MatrixSymbol, like
P = MatrixSymbol('P', 2, 2)
A regular Symbol object is assumed to be a scalar, which is why SymPy
states it cannot be equal to a matrix.
Aaron Meurer
On Sat, Oct 28, 2017 at 1:20 PM, amsympy <[email protected]> wrote:
> Hi
>
> I write the following code to display a matrix named P equal to A.T*A.
>
> ---------------------------------------------
> from sympy import *
> a, b, c, d = symbols('a, b, c, d')
> P = Symbol('P')
>
> A = Matrix( [ [a, b], [c, d] ])
> M = A.T*A
> Eq(P, M)
>
> ----------------------------------------------
>
> but sympy display
>
> False instead the expected result.
>
> Thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/fb2087d0-b4fb-42f9-ba8f-433fe4876d0e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAKgW%3D6K8U-_en9rf_Qy7qDqEvP-sbVB8HPukcW4KTu4yau2Qiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.