Let A = kQ/I be a finite-dimensional basic algebra over an algebraically closed field k which is a gentle algebra with the marked ribbon surface \(({{\cal S}_A},{{\cal M}_A},{\Gamma _A})\) . It is known that \({{\cal S}_A}\) can be divided into some elementary polygons {Δi ∣ 1 ⩽ i ⩽ d} by ΓA which has exactly one side in the boundary of \({{\cal S}_A}\) . Let ℭ(Δi) be the number of sides of Δi belonging to ΓA if the unmarked boundary component of \({{\cal S}_A}\) is not a side of Δi; otherwise, ℭ(Δi) = ∞, and let f-Δ be the set of all the non-∞-elementary polygons and \({{\cal F}_A}\) (resp. \({\rm{f}} - {{\cal F}_A}\) ) be the set of all the forbidden threads (resp. of finite length). Then we have (1) the global dimension of A is \({\rm{max}}_{1\leqslant i\leqslant d}\mathfrak{C}({\Delta _i}) - 1 = {\rm{max}}_{\Pi \in {{\cal F}_A}}l(\Pi)\) , where l(Π) is the length of Π
(2) the left and right self-injective dimensions of A are
\(\left\{{\matrix{{0,\,\,\,\,\,\,{\rm{if}}\,\,Q\,{\rm{is either a point or an oriented cycle with full relations,}}} \hfill \cr {\mathop {\max}\limits_{{\Delta _i} \in {\rm{f}} - \Delta} \{1,\mathfrak{C}({\Delta _i}) - 1\} = \mathop {\max}\limits_{\Pi \in {\rm{f}} - {{\cal F}_A}} l(\Pi),\,\,\,\,\,\,{\rm{otherwise}}{\rm{.}}} \hfill \cr}} \right.\)
As a consequence, we get that the finiteness of the global dimension of gentle algebras is invariant under Avella-Geiss (AG)-equivalence. In addition, we get that the number of indecomposable non-projective Gorenstein projective modules over gentle algebras is also invariant under AG-equivalence.