j3259の日記: 線形代数
v = [v1
v2]
v = [v1 and w = [w1 and v + w = [v1 + w1
v2] w2] v2 + w2]
kv = [kv1
kv2]
The dot product or inner product of v = (v1, v2) and w = (w1, w2) is the number
v DOT w = v1w1 + v2w2
The length (or norm) of a vector is the square root of v DOT v:
length = |v| = sqrt(v DOT v)
A unit vector u is a vector whose length equals one. Then
u DOT u = 1
1A: Divide any nonzero vector v by its length. Then
u = v / |v|
is a unit vector in the same direction as v.
1B: The dot product v DOT v is zero when v is perpendicular to w.
1C: a) If u and U are unit vectors then
u DOT U = cos(theta)
b) If u and U are unit vectors then |u DOT U|
2C: The identity matrix has 1's on the diagonal and 0's everywhere else. Then Ib = b. The elementary matrix or elimination matrix Eij that substracts a multiple l of row j from row i has the extra nonzero entry -l in the i, j position.
I = [1 0 0 and E31 = [1 0 0
0 1 0 0 1 0
0 0 1] -l 0 1]
Pivot is the first nonzero in the row. To solve n equations we want n pivots.
A = [a11 a12 and B = [b11 b12 and AB = [(a11b11 + a12b21) (a11b12 + a12b22)
a21 a22] b21 b22] (a21b11 + a22b21) (a21b12 + a22b22)]
Let the blocks of A be its columns. Let the block of B be its rows. Then block multiplication AB is columns times rows.
The matrix A is invertible if there exists a matrix A-1 such that
A-1A = I and AA-1 = I.
The Gauss-Jordan method computes A-1.
[A e1 e2 e3] = [2 -1 0 1 0 0
-1 2 -1 0 1 0
0 -1 2 0 0 1]
=> [2 -1 0 1 0 0
0 3/2 -1 1/2 1 0 (1/2 row 1 + row 2)
0 -1 2 0 0 1]
=> [1 0 0 3/4 1/2 1/4
0 1 0 1/2 1 1/2
0 0 1 1/3 2/3 1]
AT, the transpose of A uses the rows of A as its columns.
If A = [1 2 3 then trans(A) = [1 0
0 0 4] 2 0
3 4]
An n by n permutation matrix P has the n rows of I in any order. There are n! permutation matrices of order n.
The space Rn consists of all column vectors v with n components.
A subspace of a vector space is a set of vectors (including 0) that satisfies two requirements: If v and w are vectors in the subspace and c is any scalar, then
- v + w is in the subspace and
- cv is in the subspace
The column space of A consists of all linear combination of the columns. The combinations are all possible vectors Ax.
The system Ax = b is solvable if and only if b is in the column space of A.
The nullspace of A consists of all solutions to Ax = 0. These vectors x are in Rn. The nullspace containing all solutions to x is denoted by N(A).
http://en.wikipedia.org/wiki/Determinants
det A = sum over all n! permutations P = (alpha, beta, ..., omega)
= sigma(det p)a1alphaa2beta...an omega
|a b = ad - bc
c d|
|a11 a12 a13 = +a11a22a33 + a12a23a31 + a13a21a32
a21 a22 a23 -a11a23a32 - a12a21a33 - a13a22a31
a31 a32 a33|
plus "down right" minus "down left".
5D: The triangle with corners (x1, y1) and (x2, y2) and (x3, y3) has area = 1/2(determinant):
area = 1/2 |x1 y1 1 or area = 1/2 |x1 y1 when (x3, y3) = (0, 0)
x2 y2 1 x2 y2|
x3 y3 1|
The cross product of u = (u1, u2, u3) and v = (v1, v2, v3) is the vector
u CROSS v = |i j k = (u2v3 - u3v2)i + (u3v1 - u1v3)j + (u1v2 - u2v1)k
u1 u2 u3
v1 v2 v3|
This vector is perpendicular to u and v. The cross product v CROSS u is -(u CROSS v).
The cross product is a vector with |u| |v| |sin(theta)|. Its direction is perpendicular to u and v. It points "up" or "down" by the right hand rule.