In this paper, we study the Locally Linear Embedding (LLE) for nonlinear dimensionality reduction of hyperspectral data. We improve the existing LLE in terms of both computational complexity and memory consumption by introducing a spatial neighbourhood window for calculating the k nearest neighbours. The improved LLE can process larger hyperspectral images than the existing LLE and it is also faster. We conducted experiments of endmember extraction to assess the effectiveness of the dimensionality reduction methods. Experimental results show that the improved LLE is better than PCA and the existing LLE in identifying endmembers. It finds more endmembers than PCA and the existing LLE when the Pixel Purity Index (PPI) based endmember extraction method is used. Also, better results are obtained for detection.