The function of money as medium of exchange is most closely related to the overall demand for monetary transaction.
Explanation:
The transaction demand for money basically reflects the overall demand for monetary transactions in the economy which is essentially determined by the respective demands for goods and services and how many times they are commercially exchanged or traded in various markets in the economy.
Therefore, the higher the commercial flow or movement of goods and services in the economy, the higher will be the demand for money in the economy.
Now,one of the important functions of money is medium of exchange meaning that it is practically accepted as an universal medium of exchange for buying and selling any product or service in any economy or country across the world.
Since, money is the only acceptable unit or medium of exchange for any commercial transaction or exchange, the demand for monetary transaction is also practically related to the money being used as unit or medium of exchange.