# Become a Linear Algebra Expert

backOne of the most confusing concepts in linear algebra: Subspaces.

\textbf{Subspaces are certain space that is within another space that satisfies certain conditions.}

Space can be anything from a line, a plane, or a hyperplane.

The conditions that must be satisfied are:

- $\vec{0}$ must exist in the space
- When vectors in the space are added, then that resulting vector must still be in the original space (Closed Under Addition)
- When a vector in the space is multiplied by a scalar, then the resulting vector must still be in the original space (Closed Under Scalar Multiplication)

I will do two examples, one that is a subspace, and other one that is not a subspace.

### Subspace Example 1

Prove or disprove that $S=\{\begin{bmatrix}x_1\\x_2\end{bmatrix} | x_2 = 2x_1\}$ is a subspace of $\mathbb{R}^2$.

This is an equation of a line (you might recognize that if I expressed it as y=2x).

The general rule of thumb for approaching the subspace proof is to use LHS=RHS approach, where you go through LHS and RHS of a equation that you are trying to prove separately, and see if they are equal to each there at the end.

1.Zero Vector

$\vec{0} = \begin{bmatrix}0\\0\end{bmatrix}$

(LHS)

0

(RHS)

2(0)

=0

Since LHS = RHS, $\vec{0}$ exists in the space.

2. C.U.S.

We define two vectors \textbf{that are part of the space} $\vec{x}$ and $\vec{y}$.

$$\vec{x} = \begin{bmatrix}x_1\\x_2\end{bmatrix}, \vec{y} = \begin{bmatrix}y_1\\y_2\end{bmatrix}$$

We already established that the two vectors are already part of the space, therefore it is possible to rewrite the vectors as following:

$$\vec{x} = \begin{bmatrix}x_1\\2x_1\end{bmatrix}, \vec{y} = \begin{bmatrix}y_1\\2y_1\end{bmatrix}$$

Now, we add the two vectors, to produce a new vector, $\vec{x}+\vec{y}=\begin{bmatrix}x_1+y_1\\2x_1+2y_1\end{bmatrix}$.

To prove that the new vector is part of the space agin, we need to see if it still satisfies the condition, $x_2=2x_1$

(LHS)

$2x_1+2y_1$

(RHS)

$2(x_1+y_1)$

$=2x_1+2y_1$

Since second coordinate of the new vector is 2 times the first coordinate, we proved that the vector formed by addition is still part of the space.

3. C.U.S.M.

Again, we define a vector that is part of the space,

$$\vec{x} = \begin{bmatrix}x_1\\x_2\end{bmatrix}$$

Again, we already defined that $\vec{x}$ is part of the space, so we can rewrite the vector like before.

$$\vec{x} = \begin{bmatrix}x_1\\2x_1\end{bmatrix}$$

Additionally, we define a scalar value, $t, \in \mathbb{R}$.

The resulting vector formed after scalar multiplying the vector is

$$t\vec{x} = \begin{bmatrix}tx_1\\t2x_1\end{bmatrix}$$

Again, we have to see if this resulting vector is still part of the space that satisfies that the condition, $x_2=2x_1$.

(LHS)

$t2x_1$

$=2tx_1$

(RHS)

$2(tx_1)$

$=2tx_1$

Since $LHS = RHS$, we know that the space is closed under scalar multiplication.

In conclusion, since the space has zero vector included, closed under addition, and closed under scalar multiplication, we know that space S is a subspace of $\mathbb{R}^2$.

### Subspace Example 2

Prove or disprove that $S=\{\begin{bmatrix}x_1\\x_2\end{bmatrix} | x_2 = {x_1}^2\}$ is a subspace of $\mathbb{R}^2$.

This is an equation of a parabola (you might recognize that if I expressed it as $y=x^2$).

The general rule of thumb is, that if there is multiplication, division or power of variables, the space is not a subspace.

Counter Example

I am going to choose two vectors that are part of the space,

$$\vec{x} = \begin{bmatrix}1\\1\end{bmatrix}$$

$$\vec{y} = \begin{bmatrix}2\\4\end{bmatrix}$$

When these two vectors are added, the resulting vector is

$$\vec{x}+\vec{y} = \begin{bmatrix}1+2\\1+4\end{bmatrix}$$

$$\vec{x}+\vec{y} = \begin{bmatrix}3\\5\end{bmatrix}$$

Since $5\neq3^2$, it is not closed under addition.

The space does not satisfy one of the conditions, therefore the space is not a subspace.