Stability of the solution $\mathbf x=0$ of the DE $\ddot{\mathbf x}=A \mathbf x$ Differential equations of the form $\ddot{\mathbf x}=A \mathbf x$ is quite common in physics. Here I want to analyze the stability of the solution $\mathbf x=0$. Let $\mathbf x_1,\mathbf x_2$ be two solutions of the DE, such that $\mathbf x_1(0)=\mathbf 0$. The equilibrium $\mathbf x=0$ is stable iff $\forall \epsilon\forall t_0\forall\mathbf x_2,\exists\delta,|\mathbf x_2(0)|< \delta\Rightarrow |\mathbf x_1(t)-\mathbf x_2(t)|< \epsilon$ for all $t>t_0$.
My question is: what are the necessary and sufficient conditions on $A$ for the solution $\mathbf x=0$ to be stable? 
If we think of $\ddot{\mathbf x}$ as the acceleration due to a force, then there exist a positive constant $k$ such that the work done by the force of a virtual displacement $\delta \mathbf x$ from $\mathbf 0$ is 
$$
k(A\mathbf x).\mathbf x=k\mathbf x^TA\mathbf x<0.
$$
So if $A$ is symmetric, then $A$ is positive definite, so all eigenvectors must be real and negative. But what about the case that $A$ is not symmetric? what are the necessary and sufficient conditions on the eigenvalues of $A$ for the solution $\mathbf x=0$ to be stable? 
What about the equation $\dot{\mathbf x}=B\mathbf x$? This can be written as $\ddot{\mathbf x}=B\dot{\mathbf x}=B^2\mathbf x$. So we can just apply the results for two-dot equation here. Again, if $B$ is symmetric, then so is $B^2$, so all eignvalues of $B^2$ must be negative? Is that right?
I know the case $\mathbf x\in\mathbb R^2$ quite well (many DE books only discuss the case $n=2$). But are there generalisiation to higher dimensions ($\mathbf x\in \mathbb R^n$)?
The case of $\lambda=0$ is quite tricky. Please discuss them in detail.
 A: The general apparatus of linear algebra works. Take an eigendecomposition of $A$ so that $$\ddot y=(D+N)y$$ is an equivalent system. Then in the Jordan blocks the scalar theory applies to the first component, and the other components are in resonance. 
To get stable solutions in all components you need to consider that the characteristic roots come in sign-opposite pairs of roots of the eigenvalues of $A$. To exclude growth, you thus need that the real parts of the characteristic roots are zero, meaning the eigenvalues of $A$ have all to be real negative and they have to be simple, as resonance leads to growing components.
A: The second order differential equation can also be written as the following first order differential equation
$$
\dot{z} = \underbrace{\begin{bmatrix} 0 & I \\ A & 0 \end{bmatrix}}_M z, \tag{1}
$$
with $z = \begin{bmatrix} x^\top & \dot{x}^\top \end{bmatrix}^\top$. Such a first order system is Lyapunov stable (another name for your definition of stability) iff all eigenvalues of $M$ have a non-positive real part and all eigen values with a zero real part have an Jordan block associated with them of size one.
To show this one can use the Jordan form $M=H\,J H^{-1}$ and that the solution of $(1)$ can be written as $e^{M\,t}z(0)$, such that $e^{M\,t}=H\,e^{J\,t}H^{-1}$. It can be noted that $e^{J\,t}$ is a block diagonal matrix with each block the matrix exponential of the corresponding Jordan block multiplied by time. The norm of each of those blocks will go to zero in the limit as time goes to infinity if the eigenvalue associated with that block has a negative real part. However, if the associated eigenvalue has a zero real part the norm of the block is bounded by a polynomial with an order of one less then the size of the block. So for for a size of one the order of the polynomial is zero, thus constant and bounded, but for larger sizes the bound would grow to infinity as time goes to infinity, for example
$$
e^{\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} t} = 
\begin{bmatrix} 1 & t \\ 0 & 1 \end{bmatrix}.
$$
It can be shown that the eigenvalues of $M$ are related to the eigenvalues of $A$, namely if $(\lambda,v)$ is an eigenvalue-eigenvector pair of $A$ then $(\sqrt{\lambda},\begin{bmatrix} v^\top & \sqrt{\lambda}\,v^\top \end{bmatrix}^\top)$ and $(-\sqrt{\lambda},\begin{bmatrix} v^\top & -\sqrt{\lambda}\,v^\top \end{bmatrix}^\top)$ would be eigenvalue-eigenvector pairs of $M$. So in order for the eigenvalues of $M$ to have a non-positive real part and a Jordan block of size one requires that all eigenvalues of $A$ are strictly real, negative and also have a Jordan block of size one. 
Namely if an eigenvalue of $A$ has a non-zero imaginary part then at least one of the corresponding eigenvalues of $M$ will have a positive real part. If instead all eigenvalues of $A$ are strictly real and negative means that all eigenvalues of $M$ are purely imaginary. In order to ensure that the sizes of the Jordan blocks of those purely imaginary eigenvalues of $M$ are one also requires that the sizes of the Jordan blocks of all eigenvalues of $A$ are all one. For this reason one also has to exclude zero as (simple) eigenvalue of $A$, since the corresponding eigenvalues for $M$ are also both zero with an associated Jordan block of size two.
