Economic theory states that under competitive markets, economic profits are zero (even though accounting profits are not zero). What is the origin of this analysis? Who was the first author to write about this? Who was the first to put this into mathematics? I don't know how to search for this. I know Alfred Marshall is an important economist, who wrote a widely used book, but I do not have access to it. Is it him?
Any references are most welcomed.