How is the $ \chi^2 $ distribution defined at 0 for various degrees of freedom? I'm trying to understand the $\chi^2$-distribution. Wikipedia has the following graph for the probability density function:

This graph shows that for $ k = 1$, the PDF will be... infinite? The mode of the $\chi^2$-distribution is defined as $max \{k − 2, 0\}$, so $f_1(0) = ?$ 
In other graphs on the Web, it seemed like it even went higher than $1$. Like here: 

Of course, the cumulative distribution function approaches $1$ for all degrees of freedom:
 
I don't understand why the probability distribution function behaves like that around $0$ for any $k$. How is the $\chi^2$-distribution defined around $0$?
 A: The pdf of a $\chi^2$ distribution is 
$f(x;k)=\frac{1}{2^{\frac{k}{2}}\Gamma(k/2)}x^{k/2-1}\exp(-x/2).$
So we just need to evaluate the expression for $f(0;k)$.
$$
f(0;1)=\infty
$$
$$
f(0;2)=0.5
$$
$$
f(0;3)=0
$$
And so on. The R code for this is dchisq(0,k) for some positive k. It's really only interesting for $k= 2$ because $f(0;k)$ is infinite for $0<k<2$ and 0 for $k>2$.
A: Let's try to go back to the definition of this distribution and see what happens around 0.
By definition, the $\chi^2$  distribution is that of the sum of the squares of independent normal random variables:
$$
    Y = \sum_{i=1}^k Z_i^2 ,
$$
(see the wikipedia page). We see easily that the value of the density is $0$ for $k\geq 3$ and $.5$ for $k=2$. For $k=1$, the case is a bit different. 
Let's consider just that case to resolve your question: by a change of variable, we have $y=g(z)=z^2$ such that:
$$
f_Y(y) = \left| \frac{d}{dy} (g^{-1}(y)) \right| \cdot f_Z(g^{-1}(y))\\
= \left| \frac{d}{dy} (\sqrt{y}) \right| \cdot f_Z(\sqrt{y})\\
=  \frac{1}{2\sqrt{y}} \cdot  \frac{1}{\sqrt{2}\pi} \exp(-y/2)
$$
We understand a basic fact, the $\chi_1$ is not defined at $0$ because the squaring operation at that point is flat $g(0)=0$ and thus that $g^{-1}(0)$ is not defined (infinite).
