By using Ao's decomposition for stochastic dynamical systems, a new notion of potential function has been introduced by Ao and his collaborators recently. We show that this potential function agrees with the <italic>generalized Lyapunov function</italic> of the deterministic part of the stochastic dynamical system. We further prove the existence of Ao's potential function in dimensions 1 and 2 via the solution theory of first-order partial differential equations. Our framework reveals the equivalence between Ao's potential function and Lyapunov function, the latter being one of the most significant central notions in dynamical systems. Using this equivalence, our existence proof can also be interpreted as the proof of existence of Lyapunov function for a general dynamical system.