|
Triangular or diagonal matrix
|
1/diagonal entries
|
|
Permuted matrix
|
P transpose
|
|
Other
|
rref ( [A eye()] )
|
|
Way 1
|
A*B full multiplication
|
|
Way 2
|
[row A]*B
|
|
Way 3
|
[col A]*B
|
|
Way 3
|
B11*col(A1)+B21*col(A2)
|
|
Find entry 2,3
|
[row A2]*[columnB3] = 1 number
|
|
Rank 1 matrix
|
[a11*rowB1; a21*rowB1;a31*rowB1] + ...
|
|
Angle
|
cos(theta) = (v*w)/(||v||*||w||)
|
|
Outer Product
|
[column1]*[1 # #] find numbers that work
|
|
Linear Independent
|
Linearly independent if rref(A) ----> #pivots = #row
|
|
Linear transformation (x and y given)
|
T (u + v) = T (u) + T (v), T (cu) = cT (u), where c is a number. T is one-to-one if T(u)=0⇒u=0 T is onto if Col(T) = Rm.
|
|
formula
|
A'*A*xhat=A'*
|
|
Step 1
|
rref ( [A'*A A'*b] )
|
|
Step 2
|
xhat = last column of rref
|
|
Step 3
|
bhat = A*xhat --> bhat is the vector spaned A closest to v and the projection of the vector onto subspace
|
|
Step 4
|
be = b - bhat --> be is the vector perpendicular
|
|
Step 4
|
error vector/distance = norm (be) (1/sqr of components of b swuares)
|
|
For regression
|
step 1: f(x) = [x][b], step 2: A = [x.^0 ...] and y = given, step 3: do LSE and find xhat which will be a,b,c
|
|
Echelon form
|
Leading entries in every row are farther to the right than the row above. To do = elimination steps
|
|
Reduced Echelon form (rref)
|
echelon + columns of leading entries are all 0 except the entry which must be a 1. To do = eliminations steps down to right, then left to top
|
|
Ax=b with LU
|
L = identity but a21 = -λ1, a31 = -λ2, a32 = -λ3. U =
|
|
Echelon form
|
Leading entries in every row are farther to the right than the row above. To do = elimination steps
|
|
Reduced Echelon form (rref)
|
echelon + columns of leading entries are all 0 except the entry which must be a 1. To do = eliminations steps down to right, then left to top
|
|
Ax=b with LU
|
L = identity but a21 = -λ1, a31 = -λ2, a32 = -λ3. U = echelon. Then do Ly=b - given (solve for y), then Ux=y (solve for x)
|
|
Ax=b with CR
|
tMaybe not full rank. C = columns of A that have a pivot in R. R = rref form. To find x --> using R to find FV, pivots, and special solutions (if b not 0 do rref([A b])), if one soln is given then add that in gen sol and just do rref(A)
|
|
v
|
eigenvector
|
|
λ
|
eigenvalue
|
|
Finding λ
|
1. Diag or triang = entries of diag. 2. 2x2 do λ = m +- sqrt (m^2 - p), where m = (a11+a22)/2, and p = a11*a22 - a12*a21
|
|
Finding v
|
rref ( [A - λ*eye ] ) and find FV, pivots, and ss
|
|
Diagonalization
|
A = P*D*P^(-1), where P = [eigenvectors] , D = diag(λ)
|
|
When can we diagonalize*
|
Only when: square, real λ, and if repeated λ - look rref ( [A - λ*eye ] ) and only 1 pivot.
|
|
A = Q*D*Q'
|
Q = special solutions form rref ( [A - λ*eye ] ) for every λ, and then doing norm(q1) for all of them. D = diag(λs)
|
|
Is λ an eigenvalue
|
Do rref ( [A - λ*eye ] ) and has to be only 1 pivot (linearly dependent)
|
|
Positive definite
|
λs all positive
|
|
Semipositive definite
|
λs all positive and at least a 0
|
|
Indefinite
|
λ at least one is negative
|
|
Subspace
|
If u and v are in W , then u + v are in W , and cu is in W
|
|
Basis B for V
|
A linearly independent set such that Span (B) = V To show sthg is a basis, show it is linearly independent (rref(A) has NO FV) and spans(no row of 0's).
|
|
Row(A)
|
Space spanned by the rows of A: Row-reduce A and choose the rows that contain the pivots. Row(A) = R^n, dim = rank, Basis of Row = R in A = CR
|
|
Col(A)
|
Space spanned by columns of A: Row-reduce A and choose the columns of A that contain the pivots. Col(A) = R^m, dim = rank, Basis of Col = C in A = CR
|
|
Null(A) / Vector in Null
|
Solutions of Ax = 0. Row-reduce A. Null(A) = R^n, dim = n-rank, Basis of Null = rref(A), FV, pivots, special solutions
|
|
LeftNull(A)
|
Solutions of A'x = 0. Row-reduce A'. LeftNull(A) = R^m, dim = m-rank, Basis of LeftNull = rref(A'), FV, pivots, special solutions
|
|
Rank(A)
|
number of pivots
|
|
Is v in Null
|
do A*v and it needs to equal to vector 0
|
|
find v in ColA
|
same vectors as in matrix
|
|
Is v in col space of B
|
is B*x=v consistent? do rref([B v]) and see if consistent
|
|
A
|
q1 = A(:,1)
|
Q = q1
|
xhat =(q1'*A(:,2))/(q1'*q1)
|
|
ahat = Q*xhat
|
q2 = A(:,2) - ahat
|
Q(:,2) = q2
|
Q(:,1) = 1/(q'1*q1)*q1
|
|
Q(:,2) = 1/(q'2*q2)*q2
|
Q = [ Q(:,1) Q(:,2) ]
|
R = Q'*A
|
if 3x3 keep going
|
|
v and u are othogonal
|
if v*u = 0
|
|
W⊥:
|
Set of v which are orthogonal to every w in W.
|
|
Orthogonal projection:
|
If {u1 · · · uk } is a basis for W , then orthogonal projection of y on W is: yˆ=(y·u1/u1*u1)+···+(y·u1/uk*uk), and y − yˆ is orthogonal to yˆ, shortest distance btw y and W is ||y−yˆ||
|
|
Basis of W⊥:
|
basis of Null(Mw)
|
|
Equalities between basis
|
(RowA)' = NullA and vice versa. (ColA)'=LeftNullA and vice versa
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.