What preserves similarity of invertible matrices?

Suppose $A$ and $B$ are invertible $n \times n$ matrices that are similar to each other. Then for example, $A - 2I$ and $B - 2I$ are similar, and $A^{-1}$ and $B^{-1}$ are similar. What other operations will preserve similarity, and what algebraic object is the set of all invertible similar matrices (i.e. is it an algebra over some field, etc.)

-
Their transposes should be similar, too... –  Ｊ. Ｍ. Oct 14 '11 at 18:39
Let $f(x)$ be analytic, and defined $f(A)$ and $f(B)$ by their series expansions, then $f(A)$ and $f(B)$ are similar if $A$ and $B$ are... –  Sasha Oct 14 '11 at 18:53

Edit: Many functions preserve similarity, but when linear functions only are concerned, the problem belongs to an area of matrix theory that is called linear preserver problems. In particular, Hiai (1987) proved that, if $\mathbb{F} = \mathbb{R}$ or $\mathbb{C}$ and $f:M_{n,n}(\mathbb{F})\rightarrow M_{n,n}(\mathbb{F})$ is a linear function such that $f(A)$ is similar to $f(B)$ whenever $A$ is similar to $B$ over $\mathbb{F}$, then $f$ must take one of the following forms: \begin{align} &A\mapsto aS^{-1}AS+b(\textrm{tr }A)I,\\ &A\mapsto aS^{-1}A^TS+b(\textrm{tr }A)I, \textrm{ or }\\ &A\mapsto (\textrm{tr }A)M. \end{align} Here $a$ and $b$ are scalars, $S$ is an invertible matrix and $M$ is a square matrix (and all of them are over $\mathbb{F}$). Note that in the second displayed line, we have $A^T$ instead of $A^\ast$, because $A\mapsto A^\ast$ is not a linear function when the matrix is complex ($(\lambda A)^\ast \not\equiv \lambda A^\ast$).

I don't remember if Hiai's original result also holds over other fields (e.g. all fields of characteristic zero). Results of linear preserver problems are usually sensitive to the underlying fields. For instance, over an algebraically closed field, all linear functions that preserve rank-1 matrices (not necessarily square) are invertible, but this is not so over the real field or some finite fields. Here I simply copy the relevant result from the survey paper by Chi-Kwong Li and Stephen Pierce (2001). You may find some other interesting linear preserver problems in the survey paper as well as a discussion on some of the solution techniques.

-
could you please provide an explanation how to read $\small (\operatorname{tr} A)$? (is it the scalar value of the trace -function of a matrix, is it the diagonal of A ...) –  Gottfried Helms Oct 15 '11 at 7:12
Yes, $\textrm{tr} A$ is the trace of $A$, i.e. the sum of all diagonal entries of $A$. –  user1551 Oct 15 '11 at 8:19
Thank you! I asked because after b is any scalar, what is the meaning of putting another scalar factor (the trace of A) to it? (I've seen this formula in the survey paper too, and didn't see any further explanation - maybe you just cited that formula for us...) –  Gottfried Helms Oct 15 '11 at 8:27
$b$ can be any fixed (I will add this to my answer) scalar, but $\textrm{tr} A$ is the output of a linear functional, so its value may vary with $A$. –  user1551 Oct 15 '11 at 9:19

The set of all invertible $n\times n$ matrices over a field $k$, for fixed $n$, form a multiplicative group, called $\mathrm{GL}_n(k)$, the General linear group of degree $\mathbf{n}$ over $\mathbf{k}$.

To consider invertible matrices of all sizes at the same time, you can consider the direct limit of these groups under the natural inclusions $\mathrm{GL}_n(k)\hookrightarrow \mathrm{GL}_{n+1}(k)$, obtained by mapping an invertible $n\times n$ matrix $A$ to the block-diagonal $(n+1)\times(n+1)$ matrix that has $A$ in the upper left diagonal block, and $1$ in the bottom right diagonal $1\times 1$ block. This direct limit is also a multiplicative group. This group is called the infinite general linear groups or the stable general group, and denoted $\mathrm{GL}_{\infty}(k)$ or $\mathrm{GL}(k)$.

-