Second derivative of absolute value function proportional to Dirac delta function? I have recently discovered the relation

\begin{equation}
  \frac{\mathrm d^2}{\mathrm dx^2} \big| x \big| = 2\delta (x).
\end{equation}

I was very intrigued when I found this expression, and as it makes sense to me intuitively. However, I am aware that Dirac's delta "function" is defined as a distribution, not a function in the conventional sense, so there is probably more going on here than meets the untrained eye.

So my question is, what caveats are necessary for the above equation for it to be formally correct? Can it be taken literally?

I would have presented a definition of the delta function for completeness, but I am also not certain which definition is appropriate in this context. Am I correct in my understanding that the piecewise definition

\begin{equation}
  \delta (x) \equiv 
  \begin{cases} 
    \infty, &amp; \operatorname{if} x = 0 \\ 
    0,      &amp; \operatorname{if} x \neq 0
  \end{cases} 
\end{equation}

Is only an informal, intuitive definition and actually an "abuse of notation" of proper functions? 

I have knowledge up to multivariable/vector calculus and differential equations, but no formal or distribution theory, analysis, number theory, etc. training. Please accommodate if appropriate.

[I apologize for the formatting issues, I am genuinely trying to learn. Can someone please point me in the direction of a crash course for LaTeX (particularly math)? I've looked around a lot on SE and elsewhere on the web and I'm having trouble finding tutorials that explain the simplest of things, like when to use the dollar sign and when to use the double dollar, how to write dollar signs without them taking effect, when to use a package in the preamble, if the preamble is a specific location or just anything before the expression to be formatted, etc. Sorry for the meta question.]
The intuitive definition is just intuitive, mathematically it is wrong since it cannot differentiate between $\delta$ and $5 \delta$.

Formally, $\delta$ is understood as a function of functions:
$$\delta(f)=f(0)$$

Your relation 
\begin{equation}
  \frac{\mathrm d^2}{\mathrm dx^2} \big| x \big| = 2 \delta .
\end{equation}
means that for all functions $f$ which are infinitely many times differentiable and have compact support we have
$$
\int_{-\infty}^\infty f''(x) |x| dx = 2 f(0) = 2 \delta(f) 
$$

Added clarification If $g$ is a twice differentiable function, with $g''$ continuous, the for all functions $f$ which are infinitely many times differentiable and have compact support we have 
$$
\int_{-\infty}^\infty g''(x) f(x) dx =\int_{-\infty}^\infty g(x) f''(x) dx 
$$ 

Note that this identity doesn't necessary hold if $f$ is not compactly supported. This is the reason why we always test distributions on compactly supported functions.

The idea of distributions is the following:

Consider a function which is linear 
$$u : C_c^\infty(\mathbb R ^d) \to \mathbb C$$
and continuous (we will ignore the topology we consider).

$\delta$ is one such distribution. If we have a continuous (integrable) and (locally) bounded function $g$ we can interpret it as a distribution the following way:
$$u_g(f) = \int_{-\infty}^\infty f(x) g(x) dx $$

This definition makes sense because $f$ has compact support.

Now, if $g$ is a function which is differentiable everywhere, we get by parts (and using support of $f$ compact):
$$\int_{-\infty}^\infty f(x)g'(x) dx =- \int_{-\infty}^\infty f'(x)g(x) dx$$
or 
$$u_{g'}(f)=-u_g(f')$$

This suggest that we can differentiate any distribution:
$$u'(f):= -u(f')$$

With this definition $\delta$ is derivative of the $H(x)=1$ when $x \geq 0$ and $H(x)=0$ when $x &lt;0$. Moreover the derivative of $\delta$ is 
$$f \to -f'(0)$$

The concept of differentiability as distribution coincides with the classical concept for differentiable functions. But in this more general sense, many new functions become differentiable.

Note that much of what I wrote only makes sense if we use compactly supported functions....

Finally, there is a theorem which says that if $g$ has continuous derivative on $(0, \infty)$ and $(- \infty, 0)$ and has a jump discontinuity at $x=0$ then, in distribution sense the derivative is
$$g'+C \delta$$
where $g'$ is the derivative on $\mathbb R \backslash \{ 0\}$ and $C$ is the jump at $0$. Applying this result twice to $|x|$ you get the above formula.
Notice that the first derivative of $|x|$ is the sign function. This is why the second derivative is the Delta Dirac function.