Most supervised feature extraction methods like linear discriminant analysis (LDA) suffer from the limited number of available training samples. The singularity problem causes LDA to fail in small sample size (SSS) situations. Two dimensional linear discriminant analysis (2DLDA) for feature extraction of hyperspectral images is proposed in this paper which has good efficiency with small training sample size. In this approach, the feature vector of each pixel of hyperspectral image is transformed into a feature matrix. As a result, the data matrices lie in a low-dimensional space. Then, the between-class and within-class scatter matrices are calculated using the matrix form of training samples. The proposed approach has two main advantages: it deals with the SSS problem in hyperspectral data, and also it can extract each number of features (with no limitation) from the original high dimensional data. The proposed method is tested on four widely used hyperspectral datasets. Experimental results confirm that the proposed 2DLDA feature extraction method provides better classification accuracy, with a reasonable computation time, compared to popular supervised feature extraction methods such as generalized discriminant analysis (GDA) and nonparametric weighted feature extraction (NWFE) particularly compared to the 1DLDA in the SSS situation. The experiments show that two dimensional linear discriminant analysis+support vector machine (2DLDA+SVM) is an appropriate choice for feature extraction and classification of hyperspectral images using limited training samples.