Intrusion detection systems (IDSs) are able to diagnose network anomalies with the help of machine learning techniques. This paper presents a novel singular value decomposition (SVD)-based method that creates a new feature, which is applied to an IDS. The main goal is to build an effective model on datasets, which have the least possible number of features. Using the least possible number of features is inevitable in case of improving the efficiency and de-escalating the effect of curse of dimensionality in datasets with large number of features. The proposed method combines the SVD method with four classification algorithms; decision tree, Naïve Bayes, neural networks and SVM, to obtain a high accuracy in anomaly detection. This method is applied on the KDD CUP 99 and NSL_KDD datasets. Results of simulations indicate that the proposed method provides a considerable improvement in accuracy, compared with ordinary feature selection methods.