The condition Re(λ) = 0 for all eigenvalues is necessary but not sufficient for marginal stability. What additional condition is required, and what goes wrong when it fails?
Think about your answer, then reveal below.
Model answer: The additional condition is that the matrix must be non-defective: for every eigenvalue, its geometric multiplicity (the number of linearly independent eigenvectors) must equal its algebraic multiplicity (its multiplicity as a root of the characteristic polynomial). When this fails — when the matrix is defective — the solution contains generalized eigenvector terms of the form tⁿe^(λt). Even when Re(λ) = 0, the polynomial factor tⁿ grows without bound as t → ∞. Trajectories that start near the origin move away from it, so the origin is unstable despite the purely imaginary eigenvalues. The canonical example is a 2×2 matrix with a single repeated eigenvalue λ = 0i and only one independent eigenvector; the solution then contains a term growing linearly in time. Marginal stability requires the system to be able to produce purely oscillatory solutions with no polynomial growth, which demands a complete set of independent eigenvectors.
When Re(λ) = 0, the factor e^(λt) has constant modulus, so it neither damps nor amplifies. Any extra factor of t from a missing eigenvector is then left unchecked and grows. For A = [[0, 1], [0, 0]], solving directly gives x₁ = c₁ + c₂t, which grows whenever c₂ ≠ 0. With a full set of eigenvectors no such factor appears, and every solution stays bounded.