The chemical mechanism of RNA synthesis. The addition of an rNTP to a growing transcript is a Mg2+-dependent reaction that produces a 5′→3′ phosphodiester linkage.