Problem of analysis about matrix exponential, infimum and limit Let $f: \mathbb{R}^{n^2} \times \mathbb{Z}^{n} \longrightarrow \mathbb{R}$ defined by
$$
f(X,z) = \prod_{i=1}^{n} |x_i z|,
$$
where $x_i$ is the $i$-th row of $X$ and $x_iz$ is a dot product of $x_i$ and $z$.
My question is:
Is it true that
$$
\inf_{z \neq 0} \lim_{X \rightarrow 0} f(e^{X+C}, z) = \lim_{X \rightarrow 0} \inf_{z \neq 0} f(e^{X+C}, z) ?
$$
Some observations that I deduce about this:

*

*$e^{X} = \displaystyle\sum_{k=0}^{\infty} \dfrac{X^{k}}{k!}$ is infinitely differentiable and therefore $e^{X+C}$ is continuous.

*I think that you don´t need to know about the constant $C$, but $C = \log b$ and the definition is that $e^{C}=b$. $C$ is a matrix, i.e., $C \in \mathbb{R}^{n^2}$.

*Actually, still I believe that we don´t need to know about the function $f$ the same way that I wrote above. I think that the problem can be formulated as follows:

Given $f: \mathbb{R}^{n^2} \times \mathbb{Z}^{n} \longrightarrow \mathbb{R}$ continuous, is it true that $\inf_{z \neq 0} \lim_{X \rightarrow 0} f(X, z) = \lim_{X \rightarrow 0} \inf_{z \neq 0} f(X, z)$?
So I can´t do how prove it. I tested with some examples in Matlab and Wolfram Mathematica and the equality has always been valid.
One of the ways which I thought was to "open" the expressions of both sides of equality and try to reach the same result. To reach the infimum, I thought that $z$ should have all coordinates equal to zero, except 1 coordinate. In this case, I have $z \neq 0$ and maybe this is a vector that works to prove it. But I didn´t get anywhere.
 A: Define $I(X)=\inf_{z\neq0}f(e^X,z)$. Because $f$ is continuous, your question is precisely: is $I$ continuous? I claim it isn't always the case.

Call $\mathcal X$ the set of matrices $X$ such that $I(X)=0$. Then

*

*$I$ is continuous precisely on $\mathcal X$;

*$\mathcal X$ is a countable intersection of dense open sets (hence it is itself dense);

*If $n=2$, the complement of $\mathcal X$ has measure zero but is dense.


I do not know whether the complement of $\mathcal X$ is “large” (or even non-empty) in higher dimensions, although I believe that people from the Diophantine approximation realm would be able to use the ideas in 3. to settle the question. It looks similar to what is described at the Subspace theorem page on Wikipedia, but I wasn't able to apply it directly to your situation.
Points 1. and 2. above really just hinge on the fact that $\mathcal X$ is dense. Suppose for a moment it is. Then $I$ cannot be continuous at $X\notin\mathcal X$. If however $I(X)=0$, then for all $\varepsilon>0$ there exists $z^*\neq0$ such that $f(e^X,z^*)<\varepsilon/2$, so $I(X+X')\leq f(\exp(X+X'),z^*)<\varepsilon$ for all $X'$ small enough, which means that $I$ is continuous at $X$. Finally, $\mathcal X$ is the intersection of the open sets $\lbrace X:f(X,z)<2^{-k}\rbrace$, where $(z,k)$ ranges over a countable set of values.
Density of $\mathcal X$
Here is a hands-on proof of the fact that $\mathcal X$ is dense, but I will give another proof of it later that I will actually need for point 3. Denoting by $\pi_1:\mathbb R^n\to\mathbb R$ the first coordinate, it is clear that if $\ker (\pi_1\circ X)\cap\mathbb Q^n\neq\langle0\rangle$, then $\inf_{z\neq0}f(X,z)=0$. Indeed, any $w\neq0$ in the rational kernel will have some multiple $z$ with integer coordinates such that $|x_1z| = |(\pi_1\circ X)(z)| = 0$.
Fix a matrix $X$, and let us prove that $X$ is a limit of elements of $\mathcal X$. Using the previous observation, it suffices to show that it is a limit of matrices $X(k)$ such that $\pi\circ e^{X(k)}$ has non-trivial rational kernel. Choose $u\in\ker(\pi_1\circ e^X)$ non zero. There exists a sequence of diagonal matrices $P(k)$ such that $P(k)u\in\mathbb Q^n$ and $P(k)$ converges to the identity. We see that $P(k)e^XP(k)^{-1}$ has such a non-trivial rational kernel; indeed,
$$e^XP(k)^{-1}(P(k)u) = e^Xu\in\ker(\pi_1) = \ker(\pi_1\circ P(k)),$$
so $\pi_1\circ(P(k)e^XP(k)^{-1})(P(k)u)=0$ with $P(k)u\in\mathbb Q^n$ non zero. Setting $X(k)=P(k)XP(k)^{-1}$, this concludes because $e^{X(k)} = P(k)e^XP(k)^{-1}$.
Preimage of dense sets
Another proof of the density of $\mathcal X$, that I will use for 3., relies on the following result.

Fact. The matrix exponential is a local diffeomorphism, except over a singular set included in a countable union of algebraic subsets. In particular, the singular set is a countable union of closed sets of measure zero and empty interior.

This is a fairly immediate consequence of the fact that the differential of the exponential is invertible at $X$ if the differences between the eigenvalues of $X$ are not multiples of $2i\pi$ (the Wikipedia page for the derivative of the exponential cites Rossmann, Lie Groups... section 1.2, Proposition 7 for this fact). The important thing for us is that the singular set has empty interior, so the preimage of a dense set by the exponential is still a dense set. Indeed, for any non-empty open set $\mathcal U\subset\mathbb R^{n^2}$, we can find a matrix $X\in\mathcal U$ that is not in the singular set for the exponential. This makes it a local diffeomorphism around $X$, so the dense set must intersect the image of a small neighbourhood of $X$, small enough that it is contained in $\mathcal U$, which precisely means that the preimage of the dense set intersects $\mathcal U$. A similar reasoning shows that the preimage of a set of measure zero still has measure zero.
Now it is clear that $\inf_{z\neq0}f(X,z)$ must be zero for a matrix $X$ with rational coefficients. So $\mathcal X$ contains the preimage of the set of such matrices. But it is also clear that the set of matrices with rational coefficients is dense, so $\mathcal X$ contains a dense subset, which gives another proof of the density of $\mathcal X$.
The case $n=2$
For point 3., we prove first that the complement is dense. According to the remark above, it suffices to show that the set of matrices $X$ with $\inf_{z\neq0}f(X,z)>0$ is dense. I claim that it contains the following matrices, which clearly constitute a dense set:
$$ X = \begin{pmatrix}
       a & -\alpha \\
       b & -\beta
       \end{pmatrix} $$
with $a,b\in\mathbb Q^*$, $\alpha$ and $\beta$ quadratic irrational numbers (i.e. $[\mathbb Q(\alpha):\mathbb Q]=[\mathbb Q(\beta):\mathbb Q]=2$), and $\alpha/a\neq\beta/b$. For instance, $\alpha$ and $\beta$ could be elements of $\sqrt2+\mathbb Q$, which is already enough to ensure the density.
The important feature of quadratic irrational numbers is that they have finite Markov constant. In other words, there exists $\varepsilon_\alpha>0$ such that
$$ \left|\frac pq-\alpha\right|\geq\frac{\varepsilon_\alpha}{q^2} $$
for all $p\in\mathbb Z$, $q\in\mathbb N^*$, and similarly for $\beta$. Now let us consider $X$ a matrix as above, and show that it must satisfy $\inf_{z\neq0}f(X,z)>0$.
Let $d>0$ is the distance between $\alpha/a$ and $\beta/b$, and $z=(p,q)$ a non-zero element of $\mathbb Z^2$. There are 4 (overlapping) cases to consider:

*

*If $q=0$, then $f(X,z)=|abp^2|\geq|ab|>0$.

*If $q\neq0$ and $|p/q-\alpha/a|\leq d/2$, then first of all $|pa-q\alpha|>|q|\varepsilon_\alpha/|q_aq|^2$, where $q_a$ is the denominator of $a$. Moreover, $|pb-q\beta|=|bq|\cdot|p/q-\beta/b|\geq|bq|d/2$. All in all,
$$   f(X,z)
\geq \frac{\varepsilon_\alpha}{|q_a|^2|q|}\cdot|b|\cdot|q|\frac d2
   = \frac{\varepsilon_\alpha|b|d}{2|q_a|}>0. $$

*The case $q\neq0$, $|p/q-\beta/b|\leq d/2$ is similar.

*If $q\neq0$, $|p/q-\alpha/a|>d/2$ and $|p/q-\beta/b|>d/2$, then we see easily that $f(X,z)>|abq^2|\cdot(d/2)^2\geq|ab|d^2/4>0$.

All the inequalities $f(X,z)>0$ hold uniformly in $z$, so we have $\inf_{z\neq0}f(X,z)>0$ as announced.
Last but not least, it remains to show that $\mathcal X$ has full measure. We will show that $\mathcal X$ contains the preimage under $\exp$ of a set of full measure; in other words, we look for a big set of matrices $X$ such that $\inf_{z\neq0}f(X,z)=0$.
Using Khinchin's theorem on Diophantine approximations, the set of reals $r$ such that $|q_n|^2\cdot|p_n/q_n-r|\to0$ along a good rational approximation $p_n/q_n\to r$ has full measure; for instance, choose $\psi(x)=1/(x\ln(x)^{1/2})$ in the statement on the Wikipedia page. We call these numbers (mildly) well approximated. From this, we can deduce that the set of matrices
$$ X = \begin{pmatrix}
       a & -b \\
       c & -d
       \end{pmatrix}, $$
with $b/a$ (well-defined and) well-approximated, has full measure. Indeed, $(a,b)\mapsto(a,b/a)$ is a local diffeomorphism almost everywhere, and the reasoning above (with the exponential) together with Fubini's theorem are enough to conclude.
I claim that these matrices satisfy $\inf_{z\neq0}f(X,z)=0$. Indeed, let $X$ be such a matrix, and $p_n/q_n$ a sequence of rationals that approximate $a/b$ in the sense described above. Set $z_n=(p_n,q_n)$. Then, for $n$ large enough,
$$ f(X,z_n)
 = |acq_n^2|\cdot\left|\frac{p_n}{q_n}-\frac ba\right|\cdot\left|\frac{p_n}{q_n}-\frac dc\right|
\leq |ac|\cdot|q_n|^2\cdot\left|\frac{p_n}{q_n}-\frac ba\right|\cdot2\left|\frac ba-\frac dc\right|, $$
which tends to zero as $n$ goes to infinity. This shows that the complement of $\mathcal X$ is dense, and concludes the proof of point 3.
