A scoring scheme gives matches, mismatches, and gaps numeric weights; the global alignment matrix maximises the total.
highlighted = computed this step
A scoring scheme turns choices into numbers
A match adds +1, a mismatch adds −1, and a gap adds −2. The best alignment is the one with the largest total under that scheme.
match=+1,mismatch=−1,gap=−2
Global alignment maximises total score
The global alignment matrix compares every prefix of the row sequence with every prefix of the column sequence. Each cell keeps the best total score that can reach it.
cell=max(diag,up,left)
The best score is the bottom-right cell
For this pair, the bottom-right cell is 3. That is the best end-to-end alignment score under the scoring scheme.