It is surprising that these two plays have been chosen for comparison, since, in my opinion they have little in common in plot, theme, or dramatic technique. The one thing that links them is that both are critiques of the capitalist system. Shaw skewers the pretensions of both academics and the middle and upper class in their treatment of working-class people. Miller looks at the system from within and portrays the victimization of a man who thinks he's part of the system but in reality is left out in the cold when his usefulness to it has expired.
Shaw's dramatic irony in Pygmalion is that Eliza turns the tables on Higgins and gains a degree of power over him. This is much more pronounced in the musical version, My Fair Lady, than in the original play. Another irony is that Doolittle, once he is given a sum of money as an indirect result of Higgins' observations of his faults, is a much happier individual than Higgins or the other more favored characters. In Death of a Salesman, the irony, such as it is, is of a much grimmer nature. Much of Willy's negative behavior, a consequence of the strain of his work, has caused the failings of the sons in whom he places his hopes, especially Biff. The system has worn him down and created an unsavory individual. He is abusive to his wife as well, and this exacerbates his relationship to his sons. When he can no longer work and pay his insurance, there is nothing left to him, not even the human element that is supposed to bolster a family against misfortune, and his only option, as he sees it, is to end his life.
Is there a similarity between Shaw's and Miller's uses of irony? In my view, it is only that, as stated, the economic basis of the system by which we live is the cause of these developments. Higgins, though obnoxious and arrogant, is a kind of victim himself. He hardly seems to learn a lesson from his own "experiment" in turning a "flower girl" into a duchess, and this, as well as the other factors we have noted, is ironic. And Miller's Willy, though he continues to believe in the system as he desperately claims that he is "not a dime a dozen," is even more of a victim.