Hey!!
paris-madrid by train is not a good idea, it takes a very long time as celia said, and it´s more expensive than an airplane ticket, with which you can be in madrid in just two hours.
I´ve found tickets madrid-paris-madrid for 85 € (I guess paris-madrid-paris will be similar), and I´ve been told that you can find it for less than that, if you know where to look for it. Try with low-cost companies, like vueling, easy-jet, ryan-air, spanair...
And remeber as sooner you get the ticket, as cheaper it will be.
Good luck!
