Menu
QuantML.orgQuantML.org
  • Linear Algebra
  • Matrix Space
  • Dim./Basis
  • Subspaces Ops.
  • Examples

    More Examples on Matrix Space

    Example 1

    Consider all
    \(m\times n\)
    matrices, here
    \(n\)
    and
    \(m\)
    are constant (say
    \(m=5\)
    and
    \(n=17\)
    ).
    Let's denote space of all
    \(m\times n\)
    matrices by
    \(\mathcal{M}\)
    .
    Now consider a subset of all
    \(m\times n\)
    matrices,
    Consider all
    \(m\times n\)
    matrices with rank
    \(=1\)
    .
    Let's denote space of all
    \(m\times n\)
    matrices with rank
    \(=1\)
    by
    \(\mathcal{Q}\)
    .
    Is space of all
    \(m\times n\)
    matrices with rank
    \(=1\)
    \((\mathcal{Q})\)
    is a subspace of space of all
    \(m\times n\)
    matrices
    \((\mathcal{M})?\)

    Or say Is
    \((\mathcal{Q})\)
    a subspace of
    \((\mathcal{M})?\)

    For
    \((\mathcal{Q})\)
    to be a subspace, first it had to be a vector space.

    So Is
    \((\mathcal{Q})\)
    a vector space?
    Space of all
    \(m\times n\)
    matrices with rank
    \(=1\)
    \((\mathcal{Q})\)
    do not form a vector space of all
    \(m\times n\)
    matrices.

    But Why?
    Consider two rank
    \(1\)
    matrices
    \(A\in\mathcal{Q}\)
    and
    \(B\in\mathcal{Q}\)
    .
    For
    \(\mathcal{Q}\)
    to be a vector space, linear combination of
    \(A\)
    and
    \(B\)
    must
    \(\in\mathcal{Q}\)
    .
    Let's consider an example (say
    \(m=2, n=3\)
    )
    \(A= \begin{bmatrix} \color{red}{1} & 0 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix} \)
    and
    \(B= \begin{bmatrix} 0 & 0 & 0 \\ 0 & \color{red}{1} & 0 \\ \end{bmatrix} \)


    Here
    \(A\)
    and
    \(B\)
    both are rank
    \(1\)
    matrices so
    \(A\in\mathcal{Q}\)
    and
    \(B\in\mathcal{Q}\)
    .

    \(A+B= \begin{bmatrix} \color{red}{1} & 0 & 0 \\ 0 & \color{red}{1} & 0 \\ \end{bmatrix} \)

    \(A\)
    and
    \(B\)
    are rank
    \(1\)
    matrices so they
    \(\in\mathcal{Q}\)
    .
    But
    \(A+B\)
    has rank =
    \(2\)
    .
    \(A+B\)
    is a linear combination of
    \(A\)
    and
    \(B\)
    but because
    \(A+B\)
    has rank =
    \(2\Rightarrow\)
    \(A+B\notin \mathcal{Q}\)
    .
    So
    \(\mathcal{Q}\)
    is not a vector space.


    Example 2

    Consider all vectors in
    \(\mathbb{R}^4\)

    Let's denote space of all vectors in
    \(\mathbb{R}^4\)
    by
    \(\mathcal{S}\)
    .
    Now consider a subset of all vectors in
    \(\mathbb{R}^4\)

    Consider all vectors in
    \(\mathbb{R}^4\)
    where there elements sum up to
    \(0\)
    .
    for example assume a vector
    \(\vec{v}\in\mathbb{R}^4\)
    .
    \(\vec{v}=\begin{bmatrix} \color{red}{v_1\in\mathbb{R}}\\ \color{blue}{v_2\in\mathbb{R}}\\ \color{green}{v_3\in\mathbb{R}}\\ \color{brown}{v_4\in\mathbb{R}}\\ \end{bmatrix}\)
    And we want
    \( \color{red}{v_1} + \color{blue}{v_2} + \color{green}{v_3} + \color{brown}{v_4} =0 \)

    Let's denote space of all vectors in
    \(\mathbb{R}^4\)
    where there elements sum up to
    \(0\)
    by
    \(\mathcal{Q}\)
    .
    (So
    \(\vec{v}\in\mathcal{Q}\)
    )

    Is space of all vectors in
    \(\mathbb{R}^4\)
    where there elements sum up to
    \(0\)
    \((\mathcal{Q})\)
    is a subspace of space of all vectors in
    \(\mathbb{R}^4\)
    \((\mathcal{S})?\)

    Or say Is
    \(\mathcal{Q}\)
    a subspace of
    \(\mathcal{S}?\)

    Yes,
    \(\mathcal{Q}\)
    a subspace of
    \(\mathcal{S}\)
    .

    But How? Consider vectors in
    \(\mathbb{R}^4\)
    where there elements sum up to
    \(0\)
    ,
    \(\vec{v}\in\mathcal{Q}\)
    and
    \(\vec{w}\in\mathcal{Q}\)
    .
    For
    \(\mathcal{Q}\)
    to be a subspace of
    \(\mathcal{S}\)
    linear combination of
    \(\vec{v}\)
    and
    \(\vec{w}\)
    must
    \(\in\mathcal{Q}\)
    .
    \(\vec{v} = \begin{bmatrix} v_1\in\mathbb{R}\\ v_2\in\mathbb{R}\\ v_3\in\mathbb{R}\\ v_4\in\mathbb{R}\\ \end{bmatrix}\)
    ,
    \(\vec{w} = \begin{bmatrix} w_1\in\mathbb{R}\\ w_2\in\mathbb{R}\\ w_3\in\mathbb{R}\\ w_4\in\mathbb{R}\\ \end{bmatrix}\)

    There is a constraint on
    \(\vec{v}\)
    and
    \(\vec{w}\)
    , we want elements of
    \(\vec{v}\)
    and
    \(\vec{w}\)
    sums to
    \(0\)
    ,
    \[\sum_{v_i\in\vec{v}}v_i=0 \\ \sum_{w_i\in\vec{w}}w_i=0 \\ \]
    Let's take linear combination of
    \(\vec{v}\)
    and
    \(\vec{w}\)
    and if every linear combination of
    \(\vec{v}\)
    and
    \(\vec{w}\)
    \(\in\mathcal{Q}\)
    then it's a subspace of all vectors in
    \(\mathbb{R}^4\)
    .
    \(\alpha\cdot\vec{v} +\beta\cdot\vec{w} = \alpha\cdot \begin{bmatrix} v_1\\ v_2\\ v_3\\ v_4\\ \end{bmatrix} + \beta\cdot \begin{bmatrix} w_1\\ w_2\\ w_3\\ w_4\\ \end{bmatrix} ;\quad\)
    \(\alpha\in\mathbb{R}, \beta\in\mathbb{R}\)

    Say
    \( \alpha\cdot\vec{v} +\beta\cdot\vec{w} = \vec{r}\)

    \(\vec{r} = \begin{bmatrix} \alpha\cdot v_1 + \beta\cdot w_1 \\ \alpha\cdot v_2 + \beta\cdot w_2 \\ \alpha\cdot v_3 + \beta\cdot w_3 \\ \alpha\cdot v_4 + \beta\cdot w_4 \\ \end{bmatrix} \)

    For
    \(\mathcal{Q}\)
    to be a subspace of
    \(\mathcal{S}\)
    , 
    \(r\)
    must
    \(\in\mathcal{Q}\)
    .
    And if
    \(r\in\mathcal{Q}\)
    then
    \[\sum_{r_i\in\vec{r}}r_i=0\]
    Proof:
    \[\sum_{r_i\in\vec{r}}r_i = \alpha\cdot (v_1 + v_2 + v_3 + v_4) + \beta\cdot (w_1 + w_2 + w_3 + w_4) \]
    \[\sum_{r_i\in\vec{r}}r_i = \alpha\cdot (0) + \beta\cdot (0)\]
    \[\sum_{r_i\in\vec{r}}r_i = 0\]
    So space of all vectors in
    \(\mathbb{R}^4\)
    where there elements sum up to
    \(0\)
    \((\mathcal{Q})\)
    is a subspace of space of all vectors in
    \(\mathbb{R}^4\)
    \((\mathcal{S})\)