Is a phase space a function? I saw a graph of a phase space of a pendulum and it looks like an $x-y$ plane with a spiral representing the speed and position (I assume from the origin).
Are all phase spaces two dimensional, or is this just one type? I am sure people can think of countless ways to represent a motion if a pendulum. Here is one I thought of off the top of my head. Sine waves with varying frequency and in this example would it not be a function.  So maybe a phase space is not necessarily a function? 
A purpose that I am failing to spot so far.
 A: Phase space is the space in which the state of a system can be described as a function of time: the state of the system at some time $t$ is represented by a point in its phase space.  In the case of a pendulum you need two things to describe the state, $\theta$, the angle and $\dot\theta$: the rate of change of $\theta$ with time.  Both of these things are functions of time.  Note that you need both of these things: knowing just $\theta(t_0)$ for some time $t_0$ is not enough to know how the pendulum will evolve through time, but knowing them both specifies the evolution uniquely (apart from some special points perhaps).  And note also that they are independent of each other: I can specify $\dot\theta(t_0)$ completely independently of $\theta(t_0)$.  Intuitively, for a pendulum, I need to know both the angle at some moment of time and how fast it is swinging at that moment of time to know how it will evolve through time.  This makes them obvious dimensions in a two-dimensional space: if I specify any point in that space at a given time then I know the entire evolution of the system -- the path traced through phase space -- for the future (and past in fact).  This space is the phase space of the pendulum.
A pendulum, of course, only has a two-dimensional phase space: a general $n$-particle system in $3$ dimensions will have a $6n$-dimensional phase space ($3n$ positions, and $3n$ momenta).  Constraints can reduce the number of dimensions of the phase space: the pendulum is a good example: the constraint that the bob moves on the arc of a circle (ie there's a pendulum rod) reduces dimensions of the phase space from $6$ to $2$.
The underlying reason that you need both position and momentum (or position and rate of change of position) is that the equations of motion are second-order, so you need two boundary conditions (and in general two boundary conditions per particle, per dimension).
A: In classical mechanics, 
the phase space is the space of all possible states of a system;
the state of a mechanical system is defined by the constituent positions q and momenta p. p and q together determine the future behavior of that system. 
In other words if you know p and q at time t you will be able to calculate the p and q at time t+1 using the theorems of classical mechanics - Hamilton's equations.
To describe the motion of a single particle you will need 6 variables, 3 positions and 3 momenta. 
One can imagine a 6 dimensional space; three positions and three momenta.
Each point in this 6 dimensional space is a possible description of the particles' possible states, of course constraint by the laws of classical mechanics. 
If you have N particles to describe the system, you have a 6N-dimensional phase space.
Let's   take  a simple example. 
The Pendulum. 
The Pendulum consists of a single particle mass that swings in a plane.
The pendulum is thus fully described by one position and one momentum. Its momentum is zero at the top and maximum at bottom. 
The position can  be  denoted by angle and varies between plus/minus theta. If you draw states p and theta  in a Cartesian plane coordinate system you will get an ellipsoid that fully describes all possible  states of the pendulum.
Therefore  it’s (phase  space) not a function  rather it is a representation of  states of a physical  system.
The phase  space  can be  multidimensional  if the physical  system has  more  degrees of freedom.
see  details in -https://www.quora.com/What-is-phase-space
