It all depends on what type of ticket you are holding.
If you're on a Business Class ticket, then that is fine. And you might evenbe able to get a refund on that portion that you did not travel.
If you are on a cheapie economy class ticket, then there are a few things you must look at:
The route you are taking :
YYZ-LHR-/MAD-LHR-YYZ is called an "OpenJaw".
If you have no intention in using the 3rd segment of the ticket, ask your T/A or airline what the fare is for an "openjaw" routing. MAD's fare is usually common-rated with LHR if it is a 'special' ticket. That was you can relax without thinking what to do next. Does your ticket permit you to STOP in LONDON enroute to MADRID?
To give you a better answer to your question, you may email me direct with:
1. Dates of all your travel.
2. Class of travel (Y,M,G,X,B etc)
3. Fare basis
4. Stopovers in London
I'll try to help as I can.
Cheers
C340