Dirac notation
Assume you are looking at a map with a coordinate system drawn onto the map.  The origin of the coordinate system is at town A, the x-axis points east and the y-axis points north.  You draw a vector r, represented by an arrow, from the origin to town B, somewhere else on the map.  The position vector r specifies the location of town B.
Now you want to tell a friend where to find town B on a map, without sending him the map with the drawn arrow.  What information can you send him?

There are many different ways you can represent the position vector r.  You can send your friend its x- and y-coordinates, r = (x,y). 
You can also send him its length and the angle φ the vector makes with the x-axis, r =(r,φ). 
These are different representations of the vector r, which is a vector in a two-dimensional vector space.  A basis for this vector space consists of two linearly independent vectors.  Let i and j denote unit vectors pointing in the x- and y-direction, respectively.  Then i and j are a possible pair of basis vectors and i∙r = x and j∙r = y are the components of r along these basis vectors.  You can describe a vector by giving its components in some basis.


If we applied Dirac notation to the two-dimensional vector space of positions on a map, then the symbol r becomes the ket |r>.  A ket is nothing more then a symbol for a vector that does not refer to a particular representation.  Let i = |x> and j = |y> denote unit vectors pointing in the x and y-direction, respectively.  Then the kets |x> and |y> are basis vectors for this two-dimensional vector space.  In Dirac notation the dot product i∙r = x is denoted by <x|r>.  It is the x-component of the vector r.  Similarly, j∙r = y = <y|r> is the y-component of the vector r.  The bra vectors <r|, <x|, and <y| are vectors in the two-dimensional dual space.  There exists a one-to one correspondence between vectors in the original vector space and vectors in its dual space, <x|, and <y| are basis vectors for the two-dimensional dual space.  The dual space defines the rules for taking the dot product.  It also introduces a convenient notation for the dot product. 
If you want to manipulate the vectors in the two-dimensional vector space of positions on a map, then you most often need to know the components of the vectors in some basis, for example <x|r> and <y|r>.  But there are some manipulations that you can entirely do with just the symbols.  For example, you know that |r> and |-r> point in opposite directions and that |r> + |-r> = 0 without having to choose a basis.
Dirac notation is not normally used for a two or tree-dimensional vector space of position vectors, but you could use it if you wanted too.


In quantum mechanics, the state vector of a system is a vector in an infinite-dimensional vector space.  If we neglect spin and other intrinsic properties then this vector space is the space of square integrable functions.  There are infinitely many basis vectors, and there are also infinitely many ways you can choose a basis.  Dirac notation provides a way for referring to a state vector without explicitly picking a basis.  |ψ> denotes a state vector without referring to a choice of basis.  A possible basis for the space of square integrable functions the set of delta functions, δ(x-x0).  In Dirac notation we denote these basis vectors by δ(x-x0) = |x0>.  ψ(x0)= <x0|ψ> denotes the components of |ψ> along the basis vectors |x0>.  We ψ(x0) call  the wave function in coordinate space.  The wave function in coordinate space gives the components of |ψ> along the basis vectors |x0>.
Another possible basis for the space of square integrable functions the set of imaginary exponential functions, (2πħ)-1/2exp(ipx/ħ).  In Dirac notation we denote these basis vectors by |p0>.  ψ(p0) = <p0|ψ> denotes the components of |ψ> along the basis vectors |p0>.  We call ψ(p0) the wave function in momentum space.  The wave function in momentum space gives the components of |ψ> along the basis vectors |p0>.