text: user12351: 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 :
  https://proteinstructures.com/sequence/amino-acid-substitutions/
  
  user6628: 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.
  
original_text: 12351: <p>I am reading a blog and it says:</p>
  <blockquote>
  <p>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</p>
  </blockquote>
  <p>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 :</p>
  <p><a href="https://proteinstructures.com/sequence/amino-acid-substitutions/" rel="nofollow noreferrer">https://proteinstructures.com/sequence/amino-acid-substitutions/</a></p>
   6628: <p>There are 190 pairs of different amino acids:
  <span class="math-container">$$ {20\choose 2} = 190$$</span></p>
  <p>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.</p>
  