Malcolm II (a.k.a. Máel Coluim mac Cináeda) lived from 954 to 25 November 1034 and was King of Alba from 25 March 1005 to 25 November 1034. The wider picture in Scotland at the time is set out in our Historical Timeline.
Until Malcolm's rule, the Crown of Alba had passed backwards and forwards between different strands of the House of Alpin under the law of tanistry, under which the extended family elected the successor from candidates across the family.
Malcolm changed this by the simple expedient of wiping out all competition to his own line anywhere in the family (or so he thought at the time). He succeeded to the throne by killing his predecessor Kenneth III (and Kenneth's son Giric) at the Battle of Monzievaird on 25 March 1005. This took place just north of Crieff, close to the location of today's Glenturret Distillery. He later had Kenneth's grandson killed.
Malcolm's reasons for killing the competiton was straightforward. He himself had three daughters, and while they had all married well, his grandsons could not compete the more direct claims to the Crown of Alba of those he eliminated.
Malcolm II's rule started badly, with a loss in battle against the English near Durham in 1006. He put this right with an alliance with Strathclyde and a victory over the English at the Battle of Carham, on the River Tweed, in 1018. This greatly strengthened his grip on Lothian: in effect the east side of Scotland from the Forth to the Tweed. Scottish soverignty over Lothian seems to have been subsequently acknowledged by King Canute during a visit to Scotland in 1031.
In the north, Malcolm II formed an alliance with the Vikings which included the marriage of one of his daughters to the Norse Earl Sigurd of Orkney. The situation in Strathclyde was more troublesome. Malcolm's ally, King Owen, died without an heir, and Malcolm tried to place his grandson Duncan (later Duncan I of Alba) on the throne of Strathclyde. This displeased the Britons and led to Malcolm's assassination at Glamis on 25 November 1034. He was buried in the graveyard at Saint Oran's Chapel on the Isle of Iona.
Malcolm's three daughters had between them produced three notable sons. One married Earl Sigurd of Orkney, and their son Earl Thorfinn went on to bring much of Caithness and Sutherland into Scotland. One married Crínán, the Abbot of Dunkeld, and their son Duncan went on to succeed Malcom II as Duncan I. And the third married Findlàech, the sub-king of Moray, and their son Macbeth went on to kill Duncan (with Thorfinn's help) and become King Macbeth.