Local discriminant embedding (LDE) only utilizes the local information and ignores the nonlocal information. Although linear discriminant analysis (LDA) utilizes the local information and the nonlocal information simultaneously, it treats these two kinds of information equally. As we know, the local information and the nonlocal information are both effective for feature extraction, but they have different roles in feature extraction. To utilize the local information and the nonlocal information simultaneously and utilize them distinctively, a new feature extraction approach called weighted linear embedding (WLE) is proposed by using the Gaussian weighting. Further, a method to set the optimal parameter of the Gaussian weighting is put forward. WLE is evaluated on YALE, FERET face databases, the PolyU palmprint database, and the PolyU finger-knuckle-print database. The experimental results demonstrate the effectiveness of WLE.