Is the trace/determinant of an $\mathcal{O}_S$-linear endomorphism of an $\mathcal{O}_S$-module a global section of $S$? Let $S$ be a scheme, and let $F$ be a finite locally free $\mathcal{O}_S$-module. Let $g\in\text{End}_{\mathcal{O}_S}(F)$ be an endomorphism.
Locally on $S$, $F$ is free, and hence we may speak of the trace and determinant of $g$. Do these quantities glue to form a global section of $\mathcal{O}_S$?
In particular, the situation I'm interested in is when $f : C\rightarrow S$ is a smooth projective curve with $g\in\text{Aut}_S(C)$, and $F := f_*\Omega^1_{C/S}$.
 A: Cover $S$ with open affines $U_i = \text{Spec }A_i$, over each of which $F$ is free. Thus, for every $U_i$, we may define the trace of $g$ acting on $F_i := F|_{U_i}$, which is an element $tr(g_i) := tr(g|_{U_i})\in A_i$, ie an element of $\mathcal{O}_S(U_i)$. To check that the $tr(g_i)$'s glue to a global section of $\mathcal{O}_S$, we need to check that the traces agree on intersections. In general, $U_{ij} := U_i\cap U_j$ may not be affine, but we may cover each $U_{ij}$ with open affines $\{U_{ijk}\}_k$ over which the trace makes sense. In fact, by Proposition 5.3.1 in Vakil's algebraic geometry notes, we may assume that the $U_{ijk}$'s are all simultaneously distinguished in both $U_i$ and $U_j$. Thus, for any two $i\ne j$ and any $k$, we want to show that
$$tr(g_i)|_{U_{ijk}} = tr(g_j)|_{U_{ijk}}$$
But now this is a commutative algebra problem: For any free $R$-module $M$, $r\in R$, and an endomorphism $g\in End_R(M)$, the localization of $M$ at $r$ is just $M_r = M\otimes_R R_r$, whose $g$-action is given by operating on the "first factor". From this it's straightforward that the characteristic polynomial of $g$ acting on $M_r$ is precisely the image of the characteristic polynomial of $g$ acting on $M$ (an element of $R[T]$), in $R_r[T]$. Thus, by looking at coefficients of the characteristic polynomial, $tr(g|_{U_{ijk}}) = tr(g_i)|_{U_{ijk}} = tr(g_j)|_{U_{ijk}}$.
Of course the same argument shows that the characteristic polynomial of $g$ exists globally as a polynomial with coefficients in $\Gamma(S,\mathcal{O}_S)$.
