Mandatory key with Optional key means that, if the values are present (not null) they have to match 100%. If at least one of the values is missing, then the column is not considered in matching (completely ignored).
Optional means that a thing on the left will be considered a match with the thing on the right if it's missing on one side or if they're both there and the same.
Mandatory key means the two candidate rows will never match unless this field is considered a match given other matching rules. They don't need to be identical. E.g. you can have mandatory key and cross match or equivalence tables or multiply by -1, just like optional rules.