I am reading a blog and it says:

The numbers for identities and replacements used for calculating the overall alignment score in the expression above are usually presented in the form of a 20 x 20 matrix (20 is the number of the most common amino acids). In total there are 210 possible replacement pairs (residues replacing each other) of amino acids, which includes 190 pairs of different amino acid substitutions + 20 pairs of identical substitutions

My question is how are there 210 replacement pairs. What is the formula being used here? Insights will be appreciated. The link to blog is :



1 Answer 1


There are 190 pairs of different amino acids: $$ {20\choose 2} = 190$$

and 20 pairs of identical amino acids (AA, TT, WW, etc). Combining these, you get all 210 pairs referenced in the article. Another way of seeing this is dividing the 20x20 matrix into 3 parts: the diagonal, all values above the diagonal, and all values below. We have 20 values on the diagonal with 380 values to split evenly across the upper and lower parts, leaving 190 for each. Therefore, the lower (or upper) part plus the diagonal comes out to 210.

  • $\begingroup$ Thank you. I understand it now. $\endgroup$
    – John
    Jun 8, 2021 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.