The Biblioteca Nacional de España (“National Library of Spain”) is on the Paseo de Recoletos, near the Plaza de Colón. It’s the largest library in Spain and houses millions of books, maps, drawings, and photographs, including a first edition of Don Quixote that’s available in digital form.
If you like history, don’t miss the Museo Arqueológico Nacional (“National Archaeological Museum”) at the back of the building. It’s very inexpensive and packed with artifacts from the early days of Spain.