There is stuff to see and do in Madrid for months, but Madrid is the center in a cobweb of roads. This means that maybe 40% of the country or so is reachable from here in a reasonable time.
Distances in Spain are different than in US. Some cities are connected from here in an interval of less than two hours (one-way) by fast train AVE so reserving one day to explore another city as a bonus is doable with some extra work. This comprises Valencia, Salamanca, Burgos or Cordoba. You could basically go from one point to the other coin of Iberia in a day by train if you don't mind to burn a day looking at the landscape. Or sleep in the train and wake up in a different coastal city in a different Sea. Is just a question of money and planning.
In the same way if you go to Barcelona I would strongly advise to explore near destinations in Pyrenees or the South of France also.
Distances in Spain are different than in US. Some cities are connected from here in an interval of less than two hours (one-way) by fast train AVE so reserving one day to explore another city as a bonus is doable with some extra work. This comprises Valencia, Salamanca, Burgos or Cordoba. You could basically go from one point to the other coin of Iberia in a day by train if you don't mind to burn a day looking at the landscape. Or sleep in the train and wake up in a different coastal city in a different Sea. Is just a question of money and planning.
In the same way if you go to Barcelona I would strongly advise to explore near destinations in Pyrenees or the South of France also.