In this paper, we introduce a new notion in a semigroup S as an extension of Mary's inverse. Let a, d ∈ S. An element a is called left (resp. right) invertibleAn existence criterion of this type inverse is derived. Moreover, several characterizations of left (right) regularity, left (right) π -regularity and left (right) * -regularity are given in a semigroup. Further, another existence criterion of this type inverse is given by means of a left (right) invertibility of certain elements in a ring. Finally, we study the (left, right) inverse along a product in a ring, and, as an application, Mary's inverse along a matrix is expressed.