Difference between「verb」+아/어 가지고 and 「아/어서」
I understand that the former(가지고) is used more in speech (contracted) compared to the second, but are there any differences in grammar?
I learned that 「-아/어 가지고」 cannot replace 「아/어서」 if two actions are closely connected, such as
늦어서 미안해요. (I understsnd the "close relstionship" in this sentence)
학교에 걸어서 가요. (I understsnd the "coose relationship" in this sentence)
머리가 아파서 먼저 집에 갈게요. (Why can't you say "머리가 아파가지고 먼저 집에 갈게요" I don't understand why 가지고 cannot be used here, according to my textbook)
I still don't understand the difference in grammar very well.