Commonality of law or fact refers to the requirement that parties in a lawsuit must share common questions of law or fact in order to be joined together in a single action. This principle ensures that similar claims can be adjudicated efficiently and consistently, promoting judicial economy by avoiding multiple lawsuits for the same issue.