Matrix algebra from one of the students Fall '00
This is my way of simplifying thinking about matrices:
First of all, think of a very simple example that does not need a matrix
to solve it:
You want to see if the following sequence: ATTG exactly matches a second
sequence: ATTG, and to do that give a score of 1 for a match and 0 for
mismatch.
For each sequence, we will compare the first
bases to each other, and the second bases to each other, and so on. This
is called string comparison, so we get:
ATTG
ATTG
1 1 1 1
Now consider that we want to find an exact match for ATTG in the following
sequence:
CCATTGCC
In this case, we will have to compare the first base in the first sequence
with each base in the second sequence, then compare the second base in the
first sequence to each base in the second sequence, and so on. The best
way to present this is in the form of a table:, where we can put one
sequence in a raw, and the second in a column:
A T T G
C 0 0 0 0
C 0 0 0 0
A 1 0 0 0
T 0 1 0 0
T 0 0 1 0
G 0 0 0 1
C 0 0 0 0
C 0 0 0 0
But look, it is a matrix comparison. As mentioned in the class, do not
think of algebra for this matrix. Matrix here is used as a form of
comparison.
The reason for using the terms i, and j is that, considering the above
example, we have 2 sequences: N and M. the length of sequence N is 4 (n =
4), and the length of sequence M is 8 (m = 8). To refer to the first base
in the sequence M use M1. To refer to the fourth base in sequence N, use
N4. To refer to the score of comparing M1 and N4, that would be the
element S1,4 in the matrix, i.e. each element in the matrix is represented
by Si,j, where i = 1 to n (which is 4), and j = 1 to m (which is 8).
So looking at the matrix:
Sequence M is: M1 M2 M3 M4
Sequence N is:
N1 S1,1 S2,1 S3,1 S4,1
N2 S1,2 S2,2 S3,2 S4,2
N3 S1,3 S1,3 S3,3 S4,3
.
.
.
If S3,2 is Si,j, then Si-1,j is S2,2, and Si-1,j-1 is S2,1 and so on.
So we use i and j to help us and the computer to refer to specific
elements in the matrix.
So that is the way you think in terms of matrices.
Reema