Python package Sympy: How to enforce that the adjoint of the identity matrix must be equal to the identity matrix

Viewed 181

When I run this code

import sympy as sp
sp.init_printing(pretty_print=False)
I = sp.Identity(3)
A = sp.MatrixSymbol('A',3,3)
A*I
I*A
sp.adjoint(A)*I
I*sp.adjoint(A)

I get the expected results,

A
A
Adjoint(A)
Adjoint(A)

However, if I run

sp.adjoint(I)*A

I get

Adjoint(I)*A

Why doesn't Sympy replace Adjoint(I) by I ?

1 Answers
Related