In giving his order to “give to th’ edge o’ th’ sword / His wife, his babes, and all the unfortunate souls / That trace him in his line,” Macbeth demonstrates his new resolution “To crown [his] thoughts with acts, be it thought and done,” which means he wants to demonstrate his power even as an idea arises in his head. He has now defined himself as a man of action (The flighty purpose never is o’ertook / Unless the deed go with it”) in response to his recent encounter with the witches, who have shown him the row of kings of which he is not one. This encounter with the witches signifies his intent to work with their magic to fulfill his ambitions—he actually seeks their advice, and having done that, he is ready to do whatever might be necessary to terrify others, hoping this weapon of fear will strengthen his ability to hold on to his power. This man is, after all, first and foremost a warrior, and the thinks in terms of a warrior. That is part of his tragic flaw: it once made him great, but now has brought about his downfall. All quotes are from 4.1.145-155
This occurs in Act IV after Macbeth has been told that Macduff has fled to England. Making the decision to have Macduff's family killed signals Macbeth's descent into total madness and evil. He is committing murder simply out of a desire to do harm. Macbeth is now consumed by his evil ambition and feels he can do whatever he wishes since he thinks the apparitions have assured him of continued success. The killing of Macduff's family is truly the beginning of the end for Macbeth.