Run the SageMath code below or simply click here.
Replace None
with your favorite number and run the code again. The outcome is a matrix . Find a basis such that is diagonal and check your answer with the output. When you are familiar with the process enough, try n = 3
.
This note can be found at Course website > Learning resources.