Let $I$ be a non trivial interval of $\mathbb R$, let $f : I \times \mathbb R^n \to \mathbb R^n$ and consider the following ordinary differential equation (ODE): \begin{equation}\tag{$\mathscr E$}\label{ode} y'(t) = f\big(t,y(t)\big) \end{equation}

Suppose that:

- all the maximal solutions of \eqref{ode} are global (defined on $I$) ;
- and the set $S$ of such global solutions is a linear space.

Is it true that \eqref{ode} is linear ? *i.e.* that it exists $A : I \to \mathrm M_n(\mathbb R)$ (the square matrices of size $n \times n$) such that every differentiable function $y: I \to \mathbb R^n$ is a solution of \eqref{ode} if and only if it is a solution of the linear ODE
\begin{equation}\tag{$\mathscr L$}\label{ode2}
y'(t) = A(t)\,y(t)
\end{equation}

*Remark.* I did not make any assumptions on $f$ and on the dimension of $S$ but if needed, we can assume for $f$ that the Picard–Lindelöf theorem holds ($f$ is continuous in $t$ and Lipschitz continuous in $y$, or even one can assume that $f$ is $\mathscr C^1$) and we can assume that $\dim S = n$, but maybe 1 and/or 2 implies these assumptions.