Character of a permutation representation

I am self-studying representation theory, and I would like to make sure my proofs are complete.

Following Serre's notation, let $X$ be a finite set, and let $G$ be a group that acts on $X$. Let $\rho$ be the corresponding permutation representation i.e., for $s \in G$, and a basis $(e_x)_{x \in X}$ [the basis is indexed by the set $X$] of a vector space $V$, let $\rho_s(e_x) = e_{sx}$. Let $\chi_X$ be the character of $\rho$.

For $s \in G$, show that $\chi_X(s)$ is the number of elements of $X$ fixed by $s$.

My Work

Attempting to convince myself that this is indeed the case, I considered the standard basis of $\Bbb R^n$: $$\begin{pmatrix} e_1 & e_2 & \cdots & e_{n-1} &e_n \\ \end{pmatrix},$$ where $e_i$ is an $n \times 1$ column vectors of $0$'s with a $1$ in the $i$th position. Now if $s = 1$, then $\chi_X(1) = n$ because the trace of an $n \times n$ identity matrix is just $1 + \cdots +1$ $n$ times. Then if $e_{sx} \ne e_x$, then we have a $0$ in this diagonal, and so it does not contribute anything to $\chi_X(s) = \operatorname{Tr}(R_s)$ for $R_s$ the matrix associated to $\rho_s$.

My Question

How would I formally write this out? I am a little too new to see a way forward with regards to proving this in generality.

Thanks for any help.

-

You have basically already done it. Namely, consider the basis $\{e_x\}_{x\in X}$ as you have labeled it. Let $A_g$ denote the matrix of $\rho(g)$ where $\rho$ is the permutation representation corresponding to the action $G\curvearrowright X$. Note then that $A_g=[a_{x,y}]$ where $a_{x,y}=\delta_{gy,x}$ (where $\delta$ is the Kronecker delta function). Thus, we see that
$$\text{tr}(A_g)=\sum_{x\in X}a_{x,x}=\sum_{x\in X}\delta_{gx,x}=\#X^g$$
where $X^g$ is the set of elements of $X$ fixed by $g$.