Is the number of values the sign function can take on a ring ("signedness") of any fundamental importance? Can it be predicted? There are well-described methods of generalizing arbitrary functions to matrices in a natural way.
Basically, if $A=PD_AP^{-1}$ where $D_A$ is a diagonal matrix, then $f(A)=Pf(D_A)P^{-1}$, where the function $f$ is applied to the diagonal matrix element-wise.
This is automatized in some CAS systems, such as Mathematica, so one can apply arbitrary functions to matrices.
For instance, it can be applied to the Sign function with MatrixFunction[Sign, A]. It should be noted that this function is defined on the complex plane as $z/|z|$ and $\operatorname{sign} 0=0$, which is different from some other definitions (Higham - What Is the Matrix Sign Function? also talks about generalizing the sign function to matrices, but it seems they use a different definition).
For instance, this method gives
$$\operatorname{sign}\left(
\begin{array}{cc}
 1 & -8 \\
 1 & 7 \\
\end{array}
\right)=1$$
(e.g., produces an identity matrix) but
$$\operatorname{sign}\left(
\begin{array}{cc}
 1 & -8 \\
 -1 & 7 \\
\end{array}
\right)=\left(
\begin{array}{cc}
 -\frac{3}{\sqrt{17}} & -\frac{8}{\sqrt{17}} \\
 -\frac{1}{\sqrt{17}} & \frac{3}{\sqrt{17}} \\
\end{array}
\right).$$
The function can be even applied to some zero divisors.
It also can be applied to hypercomplex numbers represented in matrix form. Now, I noticed that while $\operatorname{sign} z$ can take infinitely-many values on the complex numbers, it can take only 9 values on split-complex numbers: $0$, $1$, $-1$, $j$, $-j$,  $1/2+j/2$, $1/2-j/2$, $-1/2+j/2$, $-1/2-j/2$. When applied to dual numbers, it seems to give 5 different values.
The usual rule $\operatorname{sign} (AB)=\operatorname{sign} A\cdot \operatorname{sign} B$ still holds though.
That said, I wonder, whether it has any fundamental importance (telling us about the properties of the ring), whether a ring has finite (as split-complex numbers) or infinite (as complex numbers) set of possible values of the sign function? Can this numerocity be predicted?
What about the $p$-adic rings, can the sign function be generalized there as well?
 A: Let $\mathcal{A}$ be a finite-dimensional commutative associative unital $\mathbb{R}$-algebra. (This covers split-complex, hyberbolic and a lot of other number "systems".) We want to extend the function $\operatorname{sign}(x)$ to $\mathcal{A}$ in a meaningful way (to be determined) and understand the number of values in its range.
If $\mathcal{A}$ carries a compatible $\mathbb{C}$-structure, then any extension of $\operatorname{sign}(z) = z/|z|$ takes infinitely many values ($\mathbb{T}$ is in the range) for trivial reasons since $\mathbb{C} \hookrightarrow \mathcal{A}$.
Furthermore, by virtue of finite dimensionality $\mathcal{A}$ is Artinian and hence decomposes into a direct sum of local Artinian algebras $\mathcal{A} = \bigoplus_{i=1}^n (\mathcal{A}_i, \mathfrak{m_i})$. Thus it suffices to understand the extension of $\operatorname{sign}(x)$ to such a local Artinian algebra $(\mathcal{A},\mathfrak{m})$. Moreover,  by the previous considerations we can assume that $(\mathcal{A},\mathfrak{m})$ does not carry a compatible complex structure, hence $\mathcal{A} / \mathfrak{m} \cong \mathbb{R}$ as algebras and $\mathcal{A} = \mathbb{R} \oplus \mathfrak{m}$ as $\mathbb{R}$-vector spaces.
Write $Z = \lambda \oplus X \in \mathcal{A}$ with $\lambda \in \mathbb{R}$ and $X \in \mathfrak{m}$. Thus, in particular, $r$ is the eigenvalue (multiple) of $Z$ and $X$ is nilpotent. A possible extension of $\operatorname{sign}(x)$ is an element of the $\mathcal{A}$-module $\mathscr{D}'(\mathbb{R})[X]$ via the "Taylor series":
$$
\operatorname{sign}(Z) = \operatorname{sign}(\lambda \oplus X) := \operatorname{sign}(\lambda) + 2 \sum_{k=1}^{N-1} \frac{\delta^{(k-1)}(\lambda)}{k!} X^k
$$
where $N \in \mathbb{N}$ is the smallest integer such that $\forall X \in \mathfrak{m}: X^N = 0$. Note that $\operatorname{sign}(x) \in L^1_{\mathrm{loc}}$ and $0\cdot\infty = 0$. Alternatively, one can look at it as a mapping
$$
\mathfrak{m} \to \mathscr{D}'(\mathbb{R}) \otimes_\mathbb{R} \mathcal{A}
$$
One can have an honest function when $\lambda \neq 0$, namely $\operatorname{sign}(Z) := \operatorname{sign}(\lambda)$, and so $\operatorname{sign}(Z)$ takes exactly two values on $\mathcal{A}^\times$. If $\lambda = 0$, I am currently unsure what would mean to "count the values of its range". In any case, there are infinitely many nilpotents, unless $\mathfrak{m} = 0$. Lastly, if $\mathcal{A} = \bigoplus_{k=1}^n \mathcal{A}_k$, we have $\mathcal{A}^\times = \prod_{k=1}^n \mathcal{A}_k^\times$ and so the possible-values count on $\mathcal{A}^\times$ is $2^n$.
Summary:

*

*If $\mathcal{A}$ has a complex structure, then $\operatorname{sign}(z)$ would have infinitely many distinct values in its range. In particular, it contains the circle $\mathbb{T}$.


*If $\mathcal{A}$ has no complex structure and is not a product of other algebras, then $\operatorname{sign}(x)$ has a boring extension as a function to $\operatorname{sign}(\lambda + X) := \operatorname{sign}(\lambda)$, where $\lambda$ is the eigenvalue part and $X$ is the nilpotent part. In this case, its range contains 3 distinct values inherited from $\mathbb{R}$. And if $\mathcal{A}$ is a product of $n$ such algebras without complex structure, then $\operatorname{sign}$ has $3^n$ distinct values in its range.


*If $\mathcal{A}$ has no complex structure and is not a product of other algebras, then the distribution $\operatorname{sign}(x)$ admits an extension as a distribution depending on the nilpotent parameter $X$ and whose integrals are $\mathcal{A}$-valued. In this case, we get an uncountable family of different distributions, parametrized by $X$.
Remaining Parts:


*Find an extension to general zero divisors and general idempotents.


*Make sense of "continuity" of the distributional extension $\operatorname{sign}(Z)$ over $\mathcal{A}$ (see discussion in the comments below the original question).
