Given the matrix ${\bf A} \in {\Bbb R}^{n \times n}$,
$$ \begin{array}{ll} \underset {x \in {\Bbb R}} {\text{minimize}} & \left\| x {\bf I}_n - {\bf A} \right\|_2 \end{array} $$
where $\| \cdot \|_2$ denotes the spectral norm. It seems that when $\bf A$ is symmetric, the minimizer is the mid-range of the (real) spectrum of $\bf A$. However, when $\bf A$ is non-symmetric, it is not so straightforward.
$\bf A$ is symmetric
Introducing decision variable $y \in {\Bbb R}$ and rewriting the original minimization problem in epigraph form,
$$ \begin{array}{ll} \underset {x, y \in {\Bbb R}} {\text{minimize}} & y \\ \text{subject to} & - y {\bf I}_n \preceq x {\bf I}_n - {\bf A} \preceq y {\bf I}_n \end{array} $$
After some work, the inequalities can be written as follows,
$$ \begin{aligned} x + y &\geq \lambda_{\max} ({\bf A}) \\ x - y & \leq \lambda_{\min} ({\bf A}) \end{aligned} $$
and, thus, the minimizing $x$ is the mid-range of the (real) spectrum of $\bf A$,
$$ x_{\min} := \arg\min_{x \in {\Bbb R}} \left\| x {\bf I}_n - {\bf A} \right\|_2 = \color{blue}{\frac{\lambda_{\min} ({\bf A}) + \lambda_{\max} ({\bf A})}{2}} $$
and the minimum is
$$ y_{\min} := \left\| x_{\min} {\bf I}_n - {\bf A} \right\|_2 = \frac{\lambda_{\max} ({\bf A}) - \lambda_{\min} ({\bf A})}{2} $$
Note that
$$ \begin{aligned} \lambda_{\max} ({\bf A}) &= x_{\min} + y_{\min} \\ \lambda_{\min} ({\bf A}) &= x_{\min} - y_{\min} \end{aligned} $$
Alternatively, since the matrix $\bf A$ is symmetric, it has a spectral decomposition ${\bf A} = {\bf Q} {\bf \Lambda} {\bf Q}^\top$. Given that the spectral norm is orthogonally invariant and that the spectral norm of a diagonal matrix is the $\infty$-norm of its main diagonal, we have
$$ \left\| x {\bf I}_n - {\bf A} \right\|_2 = \left\| x {\bf I}_n - {\bf \Lambda} \right\|_2 = \max\limits_i \left| x - \lambda_i ({\bf A}) \right| = \| x {\bf 1}_n - {\boldsymbol{\lambda}} ({\bf A}) \|_{\infty} $$
where ${\boldsymbol{\lambda}} ({\bf A})$ is an $n$-vector containing the spectrum of $\bf A$ (with multiplicities). Again, we conclude that the minimizing $x$ is the mid-range of the (real) spectrum of $\bf A$,
$$ \boxed{ x_{\min} := \arg\min_{x \in {\Bbb R}} \left\| x {\bf I}_n - {\bf A} \right\|_2 = \arg\min_{x \in {\Bbb R}} \| x {\bf 1}_n - {\boldsymbol{\lambda}} ({\bf A}) \|_{\infty} = \color{blue}{\frac{\lambda_{\min} ({\bf A}) + \lambda_{\max} ({\bf A})}{2}} } $$
$\bf A$ is non-symmetric
Again, introducing decision variable $y \in {\Bbb R}$ and rewriting the original minimization problem in epigraph form,
$$ \begin{array}{ll} \underset {x, y \in {\Bbb R}} {\text{minimize}} & y \\ \text{subject to} & \left\| x {\bf I}_n - {\bf A} \right\|_2 \leq y\end{array} $$
or, equivalently,
$$ \begin{array}{ll} \underset {x, y \in {\Bbb R}} {\text{minimize}} & y \\ \text{subject to} & \begin{bmatrix} y {\bf I}_n & x {\bf I}_n - {\bf A} \\ \left( x {\bf I}_n - {\bf A} \right)^\top & y {\bf I}_n \end{bmatrix} \succeq {\bf O}_{2n} \end{array} $$
However, in this case, it is not obvious that the minimizing $x$ is a "nice" function of the spectrum of $\bf A$. Hints would be most welcome.