This paper introduces a semi-supervised distance metric learning algorithm which uses pair-wise equivalence (similarity and dissimilarity) constraints to improve the original distance metric in lowerdimensional input spaces. We restrict ourselves to pseudo-metrics that are in quadratic forms parameterized by positive semi-definite matrices. The proposed method works in both the input space and kernel induced feature space, and learning distance metric is formulated as a quadratic optimization problem which returns a global optimal solution. Experimental results on several databases show that the learned distance metric improves the performances of the subsequent classification and clustering algorithms.