$b_1=(1,2)$ and $b_2=(2,1)$ form a basis for $\R^2$. Compute the trace of the linear mapping $u$ given by $u(b_1)=b_1-b_2$, $u(b_2)=b_1+b_2$.
0. The matrix of $u$ with respect to the basis $b_1,b_2$ is
$$
\left(\begin{array}{cc}
1&1\\
-1&1
\end{array}\right)
$$
and thus the trace of $u$ is $2$.
1. Choose a euclidean product $\la.,.\ra$ such that $b_1,b_2$ is orthonormal, then
$\la u(b_1),b_1\ra=1$ and $\la u(b_2),b_2\ra=1$. Hence $\tr u=2$.
2. $b_1,b_2$ are orthogonal in $\R_1^2$. Since $\la b_1,b_1\ra=3$ and $\la b_2,b_2\ra=-3$ we get
$$
\tr(u)=\tfrac13(\la u(b_1),b_1\ra-\la u(b_2),b_2\ra)
=\tfrac13(\la b_1-b_2,b_1\ra-\la b_1+b_2,b_2\ra)
=2~.
$$
3. If we use the canonical euclidean product, we get for the Gramian and $(\la u(b_j),b_k\ra)$:
$$
\left(\begin{array}{cc}
5&4\\
4&5
\end{array}\right),
\quad
\left(\begin{array}{cc}
1&-1\\
9&9
\end{array}\right)
$$
It follows that
$$
\left(\begin{array}{cc}
5&4\\
4&5
\end{array}\right)^{-1}
=\left(\begin{array}{cc}
5/9&-4/9\\
-4/9&5/9
\end{array}\right)
$$
and thus by the formula in exam:
$$
\tr(u)=\frac59+\frac49-4+5=2~.
$$
Calculationally the last two solutions are definitely not the most effective ones, but this may change.