0
$\begingroup$

I'm trying to understand is function $f(A) = \operatorname*{tr}(AC)$ linear or not?

$C$ is a matrix of constants. And if we multiply this matrix on arbitrary matrix $A$, we'll get a new matrix $B$. And the trace from matrix $B$ is a number $b_1 + b_2 + b_3 + \ldots + b_n$ by diagonal.

Does it mean that if we get a number it's a linear function?

  • 1
    Do you know the definition of linear function?2017-01-21
  • 0
    It's a function like f(x) = kx + b2017-01-21
  • 2
    As I understand, we should check if f(x+y) = f(x) + f(y), f(a*x) = a*f(x), right?2017-01-21
  • 0
    If you want to check that $f:M_n(\Bbb R)\to\Bbb R$ is an $\Bbb R$-linear functional, you must check what you just wrote for $x,y\in M_n(\Bbb R)$ and $a\in\Bbb R$. Observe that you can even choose $C\in M_{m,n}$, but in this case you must pick $A\in M_{n,m}(\Bbb R)$2017-01-21
  • 1
    @paus Your first comment is wrong. The second is correct. Understand that functions such as $x\mapsto 2x+5$ aren't called linear functions in this context. They're called affine functions. OK, getting back to your second comment, you want to prove that $f(A+B)=f(A)+f(B)$ (that is, $\operatorname{tr}((A+B)C)=\operatorname{tr}(AC)+\operatorname{tr}(BC)$) and that $f(\lambda A)=\lambda f(A)$, for all appropriate matrices $A,B$ and scalars $\lambda$. Do it!2017-01-21

2 Answers 2

3

For $C\in\mathbb{F}^{n\times n}$ with $\mathbb{F}$ field, and $$f:\mathbb{F}^{n\times n}\to \mathbb{F},\quad f(A)=\text{tr }(CA)$$ we have for all $A,B\in\mathbb{F}^{n\times n}$, for all $a,b\in\mathbb{F}$ and using well known properties of the trace:

$$f(aA+bB)=\text{tr }[C(aA+bB)]=\text{tr }(aCA+bCB)=\text{tr }(aCA)+\text{tr }(bCB)$$ $$=a\text{tr }(CA)+b\text{tr }(CB)=af(A)+bf(B)\Rightarrow f\text{ is a linear map.}$$

1

comment: Git Gud


A linear transformation is a mapping $T:V \to W$ such that for all $u$ and $v$ in $V$ and scalars $c$, $$\tag{1} T(u+v) = T(u) + T(v),$$ $$\tag{2} T(cu) = cT(u),$$ that is, the transformation is closed under addition and scalar multiplication.

Now let $f(A) = tr(AC)$. Then, $$f(A+B) = tr(C(A+B)) = tr(CA + CB) = tr(CA) + tr(CB) = f(A) + f(B).$$ Can you prove $(2)$ yourself?