What is the degree of freedom? In here, https://en.wikipedia.org/wiki/Degrees_of_freedom_(mechanics),
the degree of freedom is defined as "the number of independent parameters that define its configuration." So, if $N$ particles are in the system, the degree of freedom is $3N$.
But here, https://en.wikipedia.org/wiki/Degrees_of_freedom_(physics_and_chemistry),
 defined as "The set of all dimensions of a system is known as a phase space, and degrees of freedom are sometimes referred to as its dimensions." In this sense, the degree of freedom is $6N$.
What is the definition of the degree of freedom?
 A: A degree of freedom is basically a system variable that's unbound (free).
We say "degrees of freedom" rather than just "variables" to clarify that we're referring to that freeness of the system rather than a specific count of variables.
For example, consider a 2-D grid with a particle at $\left(x,y\right)$.  We can also refer to that particle's location in terms of polar coordinates, $\left(r,\theta\right)$.  So that's 4 variables: $\left\{x,y,r,\theta\right\}$; however, at most we can only fill in 2 of them.  This is what we mean by the system having "2 degrees of freedom": sure there're more than 2 variables, but only 2 of them are free.
Example:  $3n$ vs. $6n$ from the question
If you have a system of $n$ particles, then their positions have $3n$ degrees-of-freedom:

*

*1 for each $x$ coordinate;


*1 for each $y$ coordinate; and


*1 for each $z$ coordinate.
But what if you want to include their velocities?  Then you need $3n$ more for the components of velocity: $v_x$, $v_y$, and $v_z$.  That brings it to $6n$.
However, neither $3n$ nor $6n$ is particularly fundamental or worth memorizing.  You'll generally want to think out the number of degrees of freedom every time you consider a physical situation.
A: The good definition is the one you cite in the first paragraph, as long as we understand that "configuration" doesn't mean just "spatial arrangement". We must understand that "configuration" means spatial arrangement and velocity arrangement (configuration in the phase space).
If we take that definition literally, the answer is also $6N$, and so there is no problem at  all.
If you are in $\mathbb{R}^3$, your space has three parameters. If you have N molecules, specifying the coordinates $(x,y,z)$ of each one means giving $3N$ numbers, and that perfectly describes unambiguously the spatial distribution of the particles.
However, that is not compelte enough because that system can evolve in infinite ways. We must also specify all the velocities, which are also vectors, so we have $6N$ parameters. That's enough for Newton's lawas to solve all the equations of motions (theoretically, of course, but this can hardly be done in reality).
So we must understand that "configuration" refers to "configuration in the phase space", i.e. configuration in positions' space and velocities' space.
