Of course, Sage can compute the inverse of a linear transformation. However, not every linear transformation has an inverse, and we will see shortly how to determine this. For now, take this example as just an illustration of the basics (both mathematically and for Sage).
We can build the composition of T and its inverse, S, in both orders. We will optimistically name these as identity linear transformations, as predicted by Definition IVLT. Run the cells to define the compositions, then run the compute cells with the random vectors repeatedly — they should always return True.
We can also check that the compositions are the same as the identity linear transformation itself. We will do one, you can try the other.