|
|
|
|
|
Coordinates
How to Examples Exercise How to: We actually already partially studied this section in the Linear Independence section, when we calculated exactly what combination of the independent vectors made up another vector. Let's say we have a basis, S = [v1 v2 ... vM], of a subspace V of Rn. We also have a vector, x = [x1; x2; ...; xN]. What we want to find is a vector xB = [c1; c2; ...; cN], such that: x = S*xB or equivalently x = c1*v1 + c2*v2 + ... + cN*vN If we know xB, finding x is just a matter of doing the multiplication of S*xB. However, knowing x and finding xB is almost as easy when S is square. We start with our original equation: x = S*xB -- We multiply each side by inv(S), we know S has an inverse since its vectors are linearly independent inv(S)*x = inv(S)*S*xB -- Remember, inv(S)*S is always eye(N) inv(S)*x = eye(N)*xB -- when eye(N) multiplies anything, it remains unchanged inv(S)*x = xB Now, finding xB is also just a matter of doing the multiplication. Finding xB if S has less columns than rows is a little trickier (remember, a subspace of Rn cannot have more than N vectors in its basis (more columns than rows), otherwise they wouldn't be linearly independent). In fact, it may even be the case that x is NOT a combination of the vectors in S, see below for an example of this. When finding xB in the non-square case, it is best to stick to a system of linear equations in augmented matrix form. That is, augS = [v1 v2 ... vM x], and thinking of x as being on the other side of the colon. If the system has an inconsistency, then we know x is independent of the others, and thus not a vector in our subspace, V. Examples: Let's first start with an example of inconsistency. Consider S = [1 0; 0 1; 0 0]. Here, the vectors of S span the x-y plane in R3. Now, let's let x = [0; 0; 1]. Our augmented matrix is augS = [1 0 0; 0 1 0; 0 0 1]. The matrix is already in reduced row-echelon form, but we have an inconsistency in the last row: '0 0 : 1'. This tells us that x is independent of the vectors in S, and from a geometric standpoint this makes sense. S spans the x-y plane, but x is not a part of this plane, it lies on the z-axis. Now let's deal with the case where S is square, say S = [3 -1; 1 3] and x = [10; 10]. We can find xB in one step: xB = inv(S)*x We find that xB = [4; 2], it's that easy. Exercise: |