Let $k$ be a commutative ring. Feel free to assume it's a field.


Let $X$ be a set. This question is only interesting when $X$ is infinite.


Write $k^X$ for the $k$-algebra of functions $X \to k$, with the algebra operations defined pointwise.



> 
> What are the $k$-algebra homomorphisms $k^X \to k$? 
> 
> 
> 


Trivially, for each $x \in X$ there is a projection/evaluation map $k^X \to k$. 



> 
> Under what circumstances are there any $k$-algebra homomorphisms $k^X \to k$ apart from the projections?
> 
> 
> 


Here are some observations. Observation 2 shows that the question is not entirely trivial, in the sense that there *are* sometimes nontrivial homomorphisms $k^X \to k$.


1. When $k$ an integral domain, any homomorphism $\Phi: k^X \to k$ gives rise to an ultrafilter $\mathcal{U}\_\Phi$ on $X$. To see this, write $\chi\_S \in k^X$ for the characteristic function of a subset $S \subseteq X$. Since $\chi\_S$ is idempotent, $\Phi(\chi\_S)$ is also idempotent, and is therefore either $0$ or $1$. Write
$$
\mathcal{U}\_\Phi
=
\{ S \subseteq X : \Phi(\chi\_S) = 1 \}.
$$
It's easy to check that $\mathcal{U}\_\Phi$ is an ultrafilter on $X$ — [in other words](https://mathoverflow.net/questions/69467/an-ultrafilter-is-a-set-of-subsets-containing-exactly-one-element-of-each-finite/129930), that whenever we write $X = X\_1 \amalg \cdots \amalg X\_n$, there is precisely one $i$ for which $\Phi(\chi\_{X\_i}) = 1$.
2. When $k$ is a *finite* integral domain — that is, a finite field — the $k$-algebra homomorphisms $k^X \to k$ are in bijection with the ultrafilters on $X$. One direction of this correspondence is given as in (1). 


For the other, start with an ultrafilter $\mathcal{U}$ on $X$. We want to define a homomorphism $\Phi\_{\mathcal{U}}: k^X \to k$, so take $\phi \in k^X$. Since $k$ is finite, the fibres $(\phi^{-1}(c))\_{c \in k}$ form a finite partition of $X$. So there is precisely one element $c \in k$ such that $\phi^{-1}(c) \in \mathcal{U}$, and we put $\Phi\_{\mathcal{U}}(\phi) = c$. It's straightforward to check that $\Phi\_{\mathcal{U}}$ is a homomorphism and that the processes $\mathcal{U} \mapsto \Phi\_{\mathcal{U}}$ and $\Phi \mapsto \mathcal{U}\_\Phi$ are mutually inverse.
3. When $k$ is an integral domain and $X$ (rather than $k$) is finite, the only homomorphisms $k^X \to k$ are the projections. This follows e.g. from (1) and the fact that ultrafilters on a finite set are principal.
4. Denote by $X \cdot k$ the $k$-vector space with basis $X$. Then $k^X$, as a $k$-vector space, is isomorphic to the space of linear maps $X \cdot k \to k$. Now any $k$-algebra homomorphism $\Phi: k^X \to k$ is, in particular, a $k$-linear map, so $\Phi$ is an element of the double dual of $X \cdot k$. Hence there can only be nontrivial homomorphisms $k^X \to k$ if there are nontrivial elements of the double dual of $X \cdot k$. 


So my question seems to be closely related to one that's come up [a few times](https://mathoverflow.net/questions/49388) [here before](https://mathoverflow.net/questions/49351): how much Choice do we need in order to construct nontrivial elements of the double dual of an infinite-dimensional vector space?



For a ring $k$ and a set $X$, what are the $k$-algebra homomorphisms $k^X \to k$?
As explained in the comments, if $k$ is a field, then $k$-algebra homomorphisms $k^X\to k$ are in bijection with $|k|^+$-complete ultrafilters on $X$ (that is, ultrafilters closed under $|k|$-fold intersections, or equivalently, ultrafilters such that whenever you partition $X$ into $|k|$ pieces one of the pieces must be in the ultrafilter). In particular, they are all projections unless (and only unless) there is a measurable cardinal $\kappa$ such that $|k|<\kappa\leq |X|$ (here I count $\aleph\_0$ as measurable), since the least cardinal that supports a $|k|^+$-complete ultrafilter is measurable. When $k$ is not a field, the question seems harder. 


