Thursday, February 16, 2006

Some Linear Algebra

Dot Product
1x + 3y + 7z = 7
[1 3 7] · [x y z] = 7
scalar result. transpose.

Solving sets of Linear equations. n equations and n unknowns

x + 4y + 6z = 6
2x + 5y + 15z = -1
2x + 5y = 9


[1 4 6] [x] [ 6 ]
[2 5 15] X [y] = [-1 ]
[2 5 0] [z] [ 9 ]
Matrix multiplication. Can implement various operations. Swap rows, add multiple of one row to another, etc.
Other matrix ops: multiplication by a scalar. matrix addition.

Matrix multiplication, addition, useful for finding cyles in graphs.
Adjacency matrix. A X A yields all cycles of length 2 in the diagonal.
An yields all cycles of length n.
A + A2 + A3 + ... An. Looking at one full row or column will tell us if the graph is strongly connected.

No comments: