The trace of a square matrix is unchanged when the matrix is conjugated by an invertible matrix. This is the matrix form of the basis-independence of trace and is one of the basic reasons trace belongs to a linear transformation rather than to a chosen coordinate matrix.