A patronymic surname is a surname originated from the given name of the father or a patrilineal ancestor. Different cultures have different ways of producing patronymic surnames.
For example, early patronymic Welsh surnames were the result of the Anglicizing of the historical Welsh naming system, which sometimes had included references to several generations: e.g., Llywelyn ap Gruffydd ap Morgan (Llywelyn son of Gruffydd son of Morgan), and which gave rise to the quip, "as long as a Welshman's pedigree."
As an example of Anglicization, the name Llywelyn ap Gruffydd was turned into Llywelyn Gruffydds; i.e., the "ap" meaning "son of" was replaced by the genitive suffix "-s", but there are other cases like "ap Evan" being turned into "Bevan". Some Welsh surnames, such as John or Howell, did not acquire the suffix "-s." In some other cases the suffix was affixed to the surname much later, in the 18th or 19th century. Likewise, in some cases the "ap" coalesced into the name in some form, as in Broderick (ap Rhydderch), Price (ap Rhys) and Upjohn (ap John).