Consider a commutative ring $A= ( \mathbb{R}^n , + , \times) $, where $+$ is the usual one. Assume further that $ \times $ is continuous (with respect to the usual topology). Let $H$ be the set of *non* invertible elements of this ring.



> 
> For $k \geq 0$, what is the largest integer $n=n(k)$ such that $\mathbb{R}^n$ can be endowed with a ring structure as described above, for which the corresponding $H$ is a vector space of dimension at most $k$ ?
> 
> 
> 


For example, in the $k=0$ case we are looking for a field, and it is thus well-known that $n(0)=2$ (realized by $\mathbb{C} \simeq \mathbb{R^2}$). More generally, I can show that $n(k) \leq k + 2$ holds for any $k$ (hence showing that the quantity $n(k)$ is well defined !). 



> 
> Is it true that $n(k) = k+2$ holds for all $k \geq 0$ ? In particular, is there a ring structure (as described above) on $\mathbb{R}^3$ such that $H$ is a line ?
> 
> 
> 


Up to now, the only lower bound I have is the trivial $n(k) \geq n(k-1) \geq \cdots \geq n(0)=2$.



Ring structrures on R^n
For $k$ even, take the ring $\mathbb C[\epsilon]/\epsilon^{k/2+1}$. Non-invertible elements are multiples of $\epsilon$, which form a $k$-dimensional vector space. The ring has dimension $k+2$, so $n(k)=k+2$ for $k$ even.


For $k$ odd, take the ring $\mathbb R[\epsilon]/\epsilon^{k+1}$. By the same logic, this gives $n(k)\geq k+1$ for $k$ odd.


To make this lower bound an upper bound for $k$ odd, let us show that if the non-invertible elements form a vector space, then they form an ideal. They are closed under summation, being a vector space, and by multiplication by elements of the ring, since if $ab$ has an inverse then $a$ has an inverse. Thus we can quotient out by the non-invertible elements, and get a field. If $n(k)=k+2$ then that field can be $\mathbb C$. Then we can always find a copy of $\mathbb C$ inside the ring by a Hensel's lemma-type argument, so the ring is a vector space over $\mathbb C$, so it is even-dimensional.


This answers the question.


