How does linear discriminant analysis reduce the dimensions? There are words from "The Elements of Statistical Learning" on page 91:

The K centroids in p-dimensional input space span at most K-1 dimensional subspace, and if p 
  is much larger than K, this will be a considerable drop in dimension.

I have two questions:


*

*Why the K centroids in p-dimensional input space span at most K-1 dimensional subspace?

*How are the K centroids located?


There is no explain in the book and I didn't find the answer from related papers.
 A: Discriminants are the axes and the latent variables which differentiate the classes most strongly. Number of possible discriminants is $min(k-1,p)$. For example, with k=3 classes in p=2 dimensional space there can exist at most 2 discriminants such as on the graph below. (Note that discriminants are not necessarily orthogonal as axes drawn in the original space, although they, as variables, are uncorrelated.) The centroids of the classes are located within the discriminant subspace according to the their perpendicular coordinates onto the discriminants.

Algebra of LDA at the extraction phase is here.
A: While "The Elements of Statistical Learning" is a brilliant book, it requires a relatively high level of knowledge to get the most from it. There are many other resources on the web to help you to understand the topics in the book. 
Lets take a very simple example of linear discriminant analysis where you want to group a set of two dimensional data points into K = 2 groups. The drop in dimensions will be only be K-1 = 2-1 = 1. As @deinst explained, the drop in dimensions can be explained with elementary geometry. 
Two points in any dimension can be joined by a line, and a line is one dimensional. This is an example of a K-1 = 2-1 = 1 dimensional subspace.
Now, in this simple example, the set of data points will be scattered in two-dimensional space. The points will be represented by (x,y), so for example you could have data points such as (1,2), (2,1), (9,10), (13,13). Now, using linear discriminant analysis to create two groups A and B will result in the data points being classified as belonging to group A or to group B such that certain properties are satisfied. Linear discriminant analysis attempts to maximize the variance between the groups compared to the variance within the groups. 
In other words, groups A and B will be far apart and contain data points that are close together. In this simple example, it is clear that the points will be grouped as follows. Group A = {(1,2), (2,1)} and Group B = {(9,10), (13,13)}.
Now, the centroids are calculated as the centroids of the groups of data points so
Centroid of group A = ((1+2)/2, (2+1)/2) = (1.5,1.5) 

Centroid of group B = ((9+13)/2, (10+13)/2) = (11,11.5)

The Centroids are simply 2 points and they span a 1-dimensional line which joins them together.

You can think of linear discriminant analysis as a projection of the data points on a line so that the two groups of data points are as "separated as possible"
If you had three groups (and say three dimensional data points) then you would get three centroids, simply three points, and three points in 3D space define a two dimensional plane. Again the rule K-1 = 3-1 = 2 dimensions.
I suggest you search the web for resources that will help explain and expand on the simple introduction I have given; for example http://www.music.mcgill.ca/~ich/classes/mumt611_07/classifiers/lda_theory.pdf
