I conjecture the following:



> 
> Let $U \subset \Bbb C^{n \times n}$ be an affine subspace, and let $S\_U$ denote the "spectrum of $U$", that is
>  $$
> S\_U = \{\lambda \in \Bbb C : \det(A - \lambda I) = 0 \text{ for some } A \in U\}.
> $$
>  Then either all elements of $U$ have an identical spectrum, or $S\_U = \Bbb C$.
> 
> 
> 


Is this correct? Some simple examples of each case: for any fixed $\lambda\_i$,
$$
U\_1 = \left\{\pmatrix{\lambda\_1&t\\0&\lambda\_2}: t \in \Bbb C\right\}, \quad 
U\_2 = \left\{\pmatrix{\lambda\_1&0\\0&t}: t \in \Bbb C\right\}.
$$
Clearly, $S\_{U\_1} = \{\lambda\_1,\lambda\_2\}$ and $S\_{U\_2} = \Bbb C$. Are there any other possibilities? I suspect that there is a quick algebraic-geometry approach here that I am missing. 




---


An aside: I would also be interested in the case of real affine subspaces of $\Bbb C^{n \times n}$, if anyone has insights on what the possibilities are there. Note that the symmetric real matrices are an example of a subspace where we attain $S\_U^{(\Bbb R)} = \Bbb R \subsetneq \Bbb C$. We can clearly attain any "line" in $\Bbb C$, but I wonder if there are other possibilities.



Spectrum of a Subspace of Matrices
To expand on Christian Remling's answer a bit: in his example, setting $det(A(t) - \lambda) = 0$ becomes $(1-\lambda)t+\lambda^3=0$, and solving for $t$ gives $t = x^3/(x-1)$ -- so for any $\lambda \in \mathbb{C}$, we have $x \in S$ by choosing this $t$, with the exception of $\lambda=1$.


In general for an affine subspace of dimension $d$, we can define the space by $A(t\_1,t\_2,\dots t\_d)$, and all entries in $A$ are linear in the $t\_i$. Then $\det(A(t) - \lambda)$ is an $n$th degree polynomial in all the $t\_i$ and $\lambda$. It is possible that the determinant has no dependence on any $t\_i$, in which case we have a finite spectrum. Otherwise, we have a dependence on the $t\_i$. Then $\det(A(t)-\lambda)=0$ has a solution in $t\_1$ whenever at least one of the non-constant coefficients is nonzero. (In the above example, as long as the linear coefficient $1-\lambda\neq 0$.) Since the leading coefficient (that is not a constant 0 polynomial) is an $n-1$th degree polynomial in $\lambda$, it is zero at a most $n-1$ different places, and this is at most $n-1$ places that the spectrum can fail to be continuous. The spectrum only fails to be continuous when *all* of the coefficients in the $t\_1$ polynomial are zero, so this is an upper bound. So, theorem:


For an affine subspace of $n\times n$ matrices, the spectrum is either finite (of size at most $n$), or it is $\mathbb{C}\setminus K$, where $K$ is a finite set of exceptions (of size at most $n-1$).


