# Gaussian elimination in vector spaces

I've been working on a set of problems while learning matrix operations as well as vector spaces and subspaces. But now I have some doubts that go outside the general rule of thumb and I'm unable to continue or identify if I'm in the right track.

I have two sets of vectors $$A, B \in \mathbb{R}^3:$$ $$A ={\biggr\{ \begin{bmatrix} {-1 \\ 3 \\ 2} \end{bmatrix}, \begin{bmatrix} {2 \\ 1 \\ 1} \end{bmatrix}, \begin{bmatrix} {-5 \\ 1 \\ 0} \end{bmatrix}\biggr\}} \\ B ={\biggr\{ \begin{bmatrix} {1 \\ 4 \\ 3} \end{bmatrix}, \begin{bmatrix} {0 \\ 7 \\ 5} \end{bmatrix}\biggr\}}$$

I had to perform various kinds of calculations on those:

$$\mathbf{I.A\ Basis \ \& \ Dimension:\\ On \ A:}$$

For the basis, I first checked whether he spanning set is linearly independent, which is not, because of $$|A| = 0$$

So I went on using Gaussian elimination in order to get a basis from the spanning vectors.

$$A = \begin{bmatrix} -1 & 2 & - 5 \\ 3 & 1 & 1 \\ 2 & 1 & 0 \end{bmatrix} \xrightarrow{3R_1 + R_2} \begin{bmatrix} -1 & 2 & - 5 \\ 0 & 7 & -14 \\ 2 & 1 & 0 \end{bmatrix} \xrightarrow{2R_1 + R_2} \begin{bmatrix} -1 & 2 & - 5 \\ 0 & 7 & -14 \\ 0 & 5 & -10 \end{bmatrix}$$

Here comes my first doubt, here I followed using the mcm of 5 & 7, although I would like a confirmation on this, because I'm not sure is something is doable. And ended up with this:

$$\begin{bmatrix} -1 & 2 & - 5 \\ 0 & 7 & -14 \\ 0 & 0 & 0 \end{bmatrix}$$

Given that I haven't transposed the matrix, is valid here to take the first and second column vectors as those are the only remaining rows?

I also did this calculation for $$A^T$$ which gave me a more evident result for the next part.

$$A^T = \begin{bmatrix} -1 & 3 & 2 \\ 2 & 1 & 1 \\ -5 & 1 & 0 \end{bmatrix} \xrightarrow{} \begin{bmatrix} -1 & 3 & 2 \\ 0 & 7 & 5 \\ 0 & 0 & 0 \end{bmatrix}$$

Resulting in a $$dimA = 2$$ base, which is in sync with $$rank(A) = 2$$.

$$\mathbf{On \ B:}$$

$$rank(B) = 2$$

On top of that, its vectors are linearly independent, so from there, I know that $$dimB = 2$$ and a basis is B itself.

$$\mathbf{II.Demonstrate \ that \ A \ \& \ B \ span \ the \ same \ subspace.}$$

To face this, knowing that, if A and B span the same subspace, their vectors have to be linear combinations of each other's bases. So went on, and took the first vector in B and formed a matrix with A's basis to calculate the determinant and see if they are linearly independent or not:

$$|AB_1| = \begin{vmatrix} -1 & 0 & 1 \\ 3 & 7 & 4 \\ 2 & 5 & 3 \end{vmatrix} = 0$$

Did not bother to do the same for the other vector in B as it's exactly the same as one of A's vectors. So here I know that $$B \in A$$. Checked the same for A with the only vector that's different from B's vectors:

$$|BA_1| = \begin{vmatrix} 1 & 0 & -1 \\ 4 & 7 & 3 \\ 3 & 5 & 2 \end{vmatrix} = 0$$

So here, it is seen that $$A \in B$$ given that all of A's base vectors are a linear combination of B's vectors and the same happens with B in regards of A.

$$\mathbf{III.Change \ of \ basis \ matrix}:$$

Now I'm asked to calculate the change of basis matrix from basis A to B, and from B to A. But I'm not sure how to do this. I've been told that the inverse of the matrix is multiplied by the coordinates in the origin basis in order to obtain the destination basis. For example, in my case: $$A^T · B_1$$ but given that the basis matrixes for A and B are not squared, thus not invertible, I don't know how to do this.