IB will not check bags across tickets. It takes a lot more than a sympathetic agent, it will take a senior manager at your departure point. Thus, plan on having your bags checked to MAD and having to proceed through passport control, Customs, check-in (bag drop) for your onwards flight, passport control, and security.
As others note, "linking" is simply a note in each PNR referencing the fact that there is another ticket, but it does not mean anything in your situation.
As others note, you will bear the risk of a no show as you are not "connecting" but rather transferring between separate tickets. Thus, allow the amount of time that makes you comfortable.