# Check if LinearOperator is symmetric

I have a scipy.sparse.linalg.LinearOperator object. I'd like to check if its associated matrix is symmetric without actually instantiating the matrix in the most computationally efficient way possible. Does anybody know a good way to do this?

• Let's call your operator $A$. Can't you check $A \mathbf{e}_i - A^T \mathbf{e}_i$, for $\mathbf{e}_i$ the columns of the identity matrix? Apr 9 at 17:54
• Better to compare $x^T(Ay)$ and $y^T(Ax)$ for $x,y$ (sufficiently many) random vectors. (I assume that $A$ is too large to check all unit vectors.) Apr 9 at 18:28
• @ChristianClason, yes. That was my other option, but I was expecting a reply with the size of the system. Apr 10 at 18:32
• Sorry for the late response. The size of the system is arbitrary (likely range of somewhere between 100x100 - 100,000x100,000), but I want to be as scalable as possible. Thanks for the responses! I'll do some profiling Apr 11 at 1:52