In William Shakespeare's tragic play Macbeth, Malcolm certainly provides a foil for Macbeth. (A foil, in regards to literature, is a character who contrasts another character in order to illustrate the qualities of the character in question (or the one being analyzed). Therefore, given that Macbeth is characterized as a tyrant and Malcolm is not, Malcolm's characteristics are used to illuminate Macbeth's negative qualities.
The best way to support the fact that Malcolm is used as a foil to Macbeth (in regards to each's ability to be a good king) is through the use of textual evidence. Given that the text is a play, and there is limited evidence which is not dialogue, dialogue is the most evident way to justify the foil.
In Act IV, Malcolm and Macduff are speaking about the fall of both Scotland and Macbeth. Malcolm is admitting to Macduff that he has his own sins and worries about his ability to carry the crown as well as his father did:
It is myself I mean; in whom I know
All the particulars of vice so grafted
That, when they shall be open'd, black Macbeth
Will seem as pure as snow, and the poor state
Esteem him as a lamb, being compared
With my confineless harms.
While stating this to test Maduff's loyalty, Malcolm is being truthful about himself. After Malcolm's statement, Macduff replies:
Not in the legions
Of horrid hell can come a devil more damn'd
In evils to top Macbeth.
Here, Macduff states that there is no person worth than Macbeth on earth or in Hell.
Given that Maduff sees the distinct differences between Macbeth and Macduff one can easily see that each are very different from the other and are, therefore, foils.