Hi,
The cheapest, quickest and most flexible way from Madrid to Lisbon is by coach.
Buses leave regularly from Madrid Estacion Autobus Sur for Lisbon Oriente.
If you go to my blog at:
http://barlaventostravelblog.blogspot.com/2008/04/madrid-lisbon-porto-braga-transport.html
or http://barlaventostravelblog.blogspot.com and see the first article,
I have published there in png format (click on it to enlarge) copies of the timetable for buses operated by www.alsa.es for the routes:
Madrid Estacion Autobus Sur - Lisbon
Porto - Madrid Estacion Autobus Sur
and trains by Portuguese Railways from Porto to Braga.
If you want train timetables or bus timetables from Lisbon to Porto or Braga, look on the right hand side of my blog and find the panel:
Algarve & Portugal - Travel Transport Links
Look for:
»» Porto - Lisbon - Porto Train Timetable
and
»» RENEX Bus Service - Lisbon to Porto timetable (Also Braga)
You will be able to download the timetables in pdf format.
The fares for Madrid to Lisbon should be no more than € 50.
Lisbon to Braga by train about € 30.00
Porto to Braga about € 2.05.
You will need to get the Metro from Madrid Barajas Airport to Estacion Autobus Sur.
Hope this helps.
Porto - Braga
Madrid - Lisbon
Madrid - Porto