The lord of Gwynedd and the magical son of Mathonwy.
Gwydion fab Dôn brought to his attention the herd of magic swine owned by Pryderi and sought his premission to bring them back for him. Math fab Mathonwy agreed, and Gwydion fab Dôn set off, returning with the swine, originally the property of Arawn, which he had magically aquired. Two days later the enchantment wrought by Gwydion fab Dôn wore off, and Pryderi marched against Math fab Mathonwy, who mustered his army and went out to meet the attack.
This was exactly what Gwydion fab Dôn wanted, for he had caused the quarrel between Pryderi and his master solely for the purpose of getting Math fab Mathonwy out of his way, his intention being to help his brother, Gilfaethwy, ravish the maiden Goewin, who held the post of foot-holder. Gwydion fab Dôn and Gilfaethwy abducted Goewin and took turns in raping her.
The battle between Math fab Mathonwy and Pryderi was at stalemate, so it was agreed that Gwydion fab Dôn, who had caused the argument in the first place, should meet Pryderi in single combat. He did, and at Maen Tyriawg quickly overcame and killed Pryderi by using his magical powers. Returning triumphant to the court of Math fab Mathonwy, Gwydion fab Dôn and his brother were punished for their rape of Goewin. Math fab Mathonwy decreed that the two should spend the next three years as male and female animals, each year producing at least one offspring. The first year they spent as deer, the second as swine and the third as wolves. At the end of the third year Math fab Mathonwy restored the brothers to their human form and forgave them their crime.
The post of foot-holder had remained unfilled since Gowein had been raped, so Gwydion fab Dôn put forward his own sister, Arianrhod, for the position. She claimed to be a virgin, a necessary qualification for the post, but proved to be pregnant, for she gave birth to two boys, Dylan eil Ton and Lleu Llaw Gyffes, during the test to prove her virginity.
Gwydion fab Dôn adopted Lleu Llaw Gyffes and overcame the first two curses placed on the boy by Arianrhod. Math fab Mathonwy helped him to overcome the third by helping Gwydion fab Dôn to create the flower-maiden Blodeuwedd out of the flowers of oak, broom and meadowsweet to become Lleu Llaw Gyffes’s wife.
The events are related in the Mabinogion story of Math, Son of Mathonwy.