A simple way to understand a loan EMI calculation in terms of a lump sum investment and a monthly SIP is discussed in this post. This is applicable for all kinds of loans - home loan, car loan, personal loan etc.
There is a close connection between investment mathematics and loan/mortgage mathematics. In fact, those familiar with the formulae would tell you that they are pretty much identical!
Here is how a home loan EMI can be understood in terms of a lump sum and monthly SIP investment.