Lulach (a.k.a. Lulach mac Gilla Comgain, Lulach the Simple, or Lulach the Fool) lived from 1029 to 17 March 1058 and was King of Alba from 15 August 1057 to 17 March 1058. The wider picture in Scotland at the time is set out in our Historical Timeline.
Lulach was the step-son of Macbeth, who he succeeded to the throne. His claim was based on the fact that his mother, Princess Gruoch, was the grand-daughter of Kenneth III. Lulach's survival into adulthood was somthing of a feat in itself. After Malcolm II had killed Kenneth III he wiped out any future competiton for the crown from that side of House of Alpin. It would seem, however, that he overlooked Lulach: possibly because of the latter's reputation as a simpleton.
But having become King of Alba at his coronation at Scone in August 1057, it was clear that Lulach's hold on power could never be strong. The alliance formed by Malcolm Canmore to overthrow Macbeth was still in place and it only took until March 1058 for Lulach to be assassinated. He was, predicably succeeded by Malcolm Canmore. Lulach's son, Maelsnectan retired to a monastery.
So died the last King of the House of Alpin, a dynasty which had started when Kenneth I had become King of the Picts and Scots to form the beginnings of Alba in 843. Lulach was also, arguably, the last King of Alba. Every monarch since Kenneth I had in effect been the King of Scotland, but those up to King Aedh would have been referred to in their own time as Kings of the Picts and Scots; and those from Donald I onwards as Kings of Alba. It was only with the replacement of the House of Alpin with the House of Dunkeld that the occupant of the throne would be referred to in his own time as the King of Scotland.