Etymology
The traditional account* states that ㄷ d is derived from ㄴ n by the addition of a stroke (ㄴ而ㄷ […] 其因聲加畫). However, Gari Ledyard proposes instead that ㄷ d is borrowed from Phagspa d, ultimately from Tibetan ད d, and that it is ㄴ n which is derived by the removal of a stroke.
* Hunmin Jeongeum Haerye “Explanations and Examples of the Proper Sounds for the Instruction of the People” (1446), defining and explaining the script now known as 한글 (han-geul, “Great script, Korean script”) in South Korea and 조선글 (joseon-geul, “Korean script”) in North Korea.