In this paper, we obtain a comparison theorem and an invariant representation theorem for backward stochastic differential equations (BSDEs) without any assumption on the second variable z. Using the two results, we further develop the theory of g-expectations. Filtration-consistent nonlinear expectation (F-expectation) provides an ideal characterization for the dynamical risk measures, asset pricing and utilities. We propose two new conditions: an absolutely continuous condition and a (locally Lipschitz) domination condition. Under the two conditions respectively, we prove that any F-expectation can be represented as a g-expectation. Our results contain a representation theorem for n-dimensional F-expectations in the Lipschitz case, and two representation theorems for 1-dimensional F-expectations in the locally Lipschitz case, which contain quadratic F-expectations.