# 🔢 Are Two N-Dimensional Real Subspaces Equal If They Have The Same Dimensions?#

The topic of vector spaces and subspaces came up during a conversation with a dear friend and I could not resist reminiscing the past. They were studying for an upcoming test and I wanted to try and reinforce their intuition in some areas through a couple of examples and counter-examples.

## Rephrasing the Original Question#

Despite the title of this post being a question, the original practice problem was presented as an affirmation:

If \(S_1\) and \(S_2\) are subspaces of \(R^n\) of the same dimension, then \(S_1=S_2\)

Both the question in the title and the original affirmation are relatively trivial to understand and disprove when slightly rephrased; that allows us to approach it from the right angle:

Does the dimension of a space \(S\) fully determine its properties as to make two spaces \(S_1\) and \(S_2\) sharing the same dimension equal?

Considering the dimension of a space is simply the cardinality of its basis, we can once again re-write the question as follows:

If two subspaces \(S_1\) and \(S_2\) have the same number of vectors in their respective bases \(B_1\) and \(B_2\), are they therefore equal?

We are certainly getting closer, but we can attempt to rephrase the question further in order to arrive to its most absurd variation:

If \(|B_1|=|B_2|\), are then \(span(B_1)\) and \(span(B_2)\) also equal?

Considering the \(span\) of a set \(V\) is the set of vectors \(\{w_1,...,w_n\}\) resulting from all possible linear combinations of \(v_i \in V\), we can finally rephrase the previous iteration of our question as follows:

Given \(|B_1|=|B_2|\), the resulting sets \(L_1\) and \(L_2\) of all possible linear combinations for vectors \(b_{1i} \in B_1\) and vectors \(b_{2i} \in B_2\) are equal

This is obviously `false`

. Although bases \(B_1\) and \(B_2\) may have the same number of vectors \(k\) in them, that doesn’t mean those vectors are also equal, much less linearly *dependent*. Therefore, any given pair of linearly independent vectors \(b_{1i} \in B_1\) and \(b_{2i} \in B_2\) can help us disprove the statement in question.

Consider that \(\forall l_1 \in L_1\) we have \(l_{1i} := \langle \alpha_1 \cdot b_{11}, \alpha_2 \cdot b_{12}, ... , \alpha_n \cdot b_{1k} \rangle \) and

\(\forall l_2 \in L_2\) similarly \(l_{2i} := \langle \beta_1 \cdot b_{21}, \beta_2 \cdot b_{22}, ... , \beta_n \cdot b_{2k} \rangle \).

Any \(b_{2i}\) which cannot be represented as \(\langle \alpha_1 \cdot b_{11}, \alpha_2 \cdot b_{12}, ... , \alpha_n \cdot b_{1k} \rangle \) directly contradicts the original statement.

## In Search of \(b_{2i}\)#

The conditions under which \(b_{2i}\) exists vary, of course, but the fact it’s at all possible shows the initial statement can be falsified. However, it’s helpful to find actual examples showing the above holds true.

Consider the basis \(B\) of \(R^2\), for which the following holds:

Working our way backwards, we group the members of \(B\) into two separate bases \(B_1\) and \(B_2\) such that \(B_1=\{b_{11}\}\) and \(B_2=\{b_{21}\}\).

As we can observe, \(|B_1|=|B_2|=1\). However, \(\nexists l_{1i}:=\langle \alpha_1 \cdot b_{11} \rangle \) and \(l_{1i} = b_{21}\) since \(b_{11}\) and \(b_{21}\) are linearly independent coming from the same initial set \(B\). As shown below, \(\nexists \alpha_1\) such that \(b_{21}=\alpha_1 \cdot b_{11}\)

## Observing \(S_1\) and \(S_2\) in Action#

The counter-example presented above can be visualized as follows:

```
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.axhline(0, color="black", linewidth=0.5)
ax.axvline(0, color="black", linewidth=0.5)
ax.plot(0, 0, color="black", marker="o")
ax.grid()
qi = ax.quiver(
0, 0, 1, 0, angles="xy", scale_units="xy", scale=1, color="r", width=0.012
)
ax.text(1, 0.1, "b11 = i")
mqi = ax.quiver(
0, 0, -1.5, 0, angles="xy", scale_units="xy", scale=1, color="r", width=0.012
)
ax.text(-1.5, 0.1, "-1.5*b11")
qj = ax.quiver(
0, 0, 0, 1, angles="xy", scale_units="xy", scale=1, color="b", width=0.012
)
ax.text(0.1, 1, "b21 = j")
ax.axhline(0, color="r", linewidth=5, alpha=0.25, label="S1 = span(b11)")
ax.axvline(0, color="b", linewidth=5, alpha=0.25, label="S2 = span(b21)")
ax.set_xlim([-2, 2])
ax.set_ylim([-2, 2])
ax.legend(shadow=True, loc=(0.65, 0.85))
ax.set_xlabel("S1")
ax.set_ylabel("S2", rotation=0)
plt.show()
```

As can be seen, despite \(|B_1|\) being equal to \(|B_2|\) we have that subspaces \(S_1\) and \(S_2\) are clearly very different.

## Final Words#

That’s all for now; I managed to scratch the itch of nerding out with them on the geometric implications of the original question and how to intuitively understand the scenario.

Stay in touch by entering your email below and receive updates whenever I post something new:

As always, thank you for reading and remember that feedback is welcome and appreciated; you may contact me via email or social media. Let me know if there's anything else you'd like to know, something you'd like to have corrected, translated, added or clarified further.