Let $f:X\rightarrow S$ be a smooth projective morphisms of noetherian schemes and let $\mathcal{O}(1)$ be a relatively ample line bundle. Let $\mathcal{E}$ be a coherent sheaf over $X$ and flat over $S$. Suppose there exists an open subscheme $U\subset X$ such that $\mathcal{E}|\_U$ is locally free and complement of $U$ has codimension atleast $2$ in $X$. Can we define determinant of $\mathcal{E}$? i.e., is there a line bundle on $X$ which is the "determinant" of $\mathcal{E}$?


Note that $\mathcal{E}$ is not torsion free. But has the extra assumption that there exists an open subscheme $U\subset X$ such that $\mathcal{E}|\_U$ is locally free and complement of $U$ has codimension atleast $2$ in $X$.



determinant of a coherent sheaf, locally free on a big open set
For any sheaf which admits a finite locally free resolution its determinant is defined as the alternating tensor product of the determinants of its terms. Under your assumptions $\mathcal{E}$ admits such a resolution, so this definition applies.


