As before, we can use Sage to demonstrate theorems. With randomly-generated matrices, these verifications might be even more believable. Some of the above results should feel fairly routine, but some are perhaps contrary to intuition. For example, Theorem MMT might at first glance seem surprising due to the requirement that the order of the product is reversed. Here is how we would investigate this theorem in Sage. The following compute cell should always return True. Repeated experimental evidence does not make a proof, but certainly gives us confidence.
By now, you can probably guess the matrix method for checking if a matrix is Hermitian.
We can illustrate the most fundamental property of a Hermitian matrix. The vectors x and y below are random, but according to Theorem HMIP the final command should produce True for any possible values of these two vectors. (You would be right to think that using random vectors over QQbar would be a better idea, but at this writing, these vectors are not as “random” as one would like, and are insufficient to perform an accurate test here.)