Lanyon and Jekyll are both medical doctors and old acquaintances. They also have Utterson as a close mutual friend, but beyond this they have little else in common. Lanyon is a stolid conservative type, who believes very much in sticking to the rules in his life and work. Jekyll is the opposite; he is adventurous and imaginative. He seeks after forbidden knowledge, to push limits, break rules.
Lanyon is the voice of convention, the representative of law-abiding society, Jekyll is a romantic, and dangerous Faust-like figure, dabbling in unholy acts in order to pursue his lusts and passions under cover of his second self Hyde. His actions drive a wedge between him and Lanyon, while Utterson tries vainly to mediate between them. Lanyon, in fact, is so appalled when he sees the results of Jekyll’s unholy experiments that the shock literally kills him.
Yet Lanyon and Jekyll are not simple polar opposites. Jekyll repents of his deeds and suffers terribly, as is clear in his confession. His longing for greater knowledge and freedom need not in itself have been a bad thing, the problem is that he was unable to curb the darker side of his nature, which leads to his alter ego Hyde ultimately taking over completely. Jekyll, in his confession, shows the kind of propriety, the concern to maintain social respectability, that is so evident in Lanyon.
Lanyon, meanwhile, is maybe not as narrow-minded and set in his ways as might be thought. When he is about to (unwittingly) witness Hyde’s transformation into Jekyll, Hyde issues a word of warning.
Will you be wise? will you be guided? will you suffer me to take this glass in my hand and to go forth from your house without further parley? or has the greed of curiosity too much command of you? (chapter 9)
Hyde, then, asks whether Lanyon will be 'wise' and prudent, or not. Lanyon, for once, acts without caution, and decides to see the whole strange business through. He stays to witness Hyde's metamorphosis into Jekyll, which has the effect of almost blasting his senses. However, he does for a moment show the kind of curiosity and interest in unlawful things that Jekyll has in larger doses. It might be that he is not so rigid after all, although it is hard to imagine that he would ever have gone to the kind of lengths that Jekyll does.