Spaces

Spaces are geometric containers that are constructed of infinite dimensions. A one-dimensional point space differs from a two-dimensional plane space; we have a more comprehensive representation in the latter, like matrices that we cannot express in a line space. Each space can encapsulate different mathematical representations from points up to the maximum tensor contained within that space.

The description below may have mathematical flaws that I am unaware of, but it will be a helpful tool to imagine spaces before working with tensors. Each space is a generalization of the previous space and contains it.

Rank 0 Space: Point Space#

A point is a 0-d space with no axes. We can only have:

Points#

Values.

  • Examples: $1, 0$ and $-3$.

Rank 1 Space: Line Space#

A line is a 1d space that has one axes. We can have:

Points#

Points that exist in a single dimensions.

  • Examples: $1, 0$ and $-3$.

Vectors#

Representation that extend a line to a point. A vector value is accessed with a single index.

  • They can represent a line that start from the origin to the point in space.
  • Examples: the basis axes $[1]$ and generally any line in space like $[-2]$ and $[100]$.
  • The origin is $[0]$.

Rank 2 Space: Plane Space#

A plane is a 2d space that has two axes. We can have:

Points#

Points that exist in 2 dimensions.

  • Examples: $(2, 3), (4, 100)$ and $(0, 0)$.

Vectors#

Representation that extend a line to a point of 2 dimensions. A vector value is accessed with a single index.

  • They can represent a line that start from the origin to the point in space.
  • Examples: the basis axes $[1, 0], [0, 1]$ and generally any line in space like $[-2, 3]$.
  • The origin is $[0,0]$.

Matrices#

A representation that consists of vectors. Possible vectors in this space are 2d vectors. A matrix value is accessed with two indices.

  • They can reprent a plane between the vectors: $$\begin{bmatrix}0 & 1 \\ 1&0\end{bmatrix} consists\;of \;v_1=\begin{bmatrix}0\\1\end{bmatrix} and \;v_2=\begin{bmatrix}1\\0\end{bmatrix}$$ $$\begin{bmatrix}2 & 2 & 2 \\ 3 & 5 & 6 \end{bmatrix} consists\;of\; v_1 = \begin{bmatrix}2 \\ 3 \end{bmatrix} , v_2 = \begin{bmatrix}2 \\ 5 \end{bmatrix} and \;v_3=\begin{bmatrix}2\\6\end{bmatrix} $$ Transposing a matrix just means transposing its vectors. If one vector can be transformed to another.
  • The origin is: $$\begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$$
  • Number of independent vectors indicates a matrix rank. Independent vectors or orthogonal vectors are vectors that cannot be generated form linear combination of them.
    • The following matrices are rank 1 because all their vectors are dependent (one can be formed from the others). They exist on the same line, and thus they do not span the whole 2d plane. $$\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 & 2 \\ 1 & 2 \end{bmatrix} , \begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3\end{bmatrix} or \begin{bmatrix} 1 & 2 & 3 & 100 \\ 1 & 2 & 3 & 100\end{bmatrix} \dots $$
    • The following matrices are rank 2 and they span the whole 2d plane, they are called full rank matrices. Because there are two vectors that are independent (orthogonal) and can form a plane. Regardless of the values of $x$, all other vectors will be dependent and exist on the same plane: $$ \begin{bmatrix} 1 & 2 \\ 1 & 1 \end{bmatrix} , \begin{bmatrix} 1 & 2 & x \\ 1 & 1 & x\end{bmatrix} or \begin{bmatrix} 1 & 2 & x & x \\ 1 & 1 & x & x\\\end{bmatrix} \dots$$

Rank 3 Space: Universe Space#

A universe is a 3-d space with three axes. We can have:

Points#

Points that exist in 3 dimensions.

  • Like $(2, 3, 5), (4, 100, -1)$ and $(0, 0, 0)$.

Vecotrs#

Representation that extends a line to a point of 3 dimensions. A vector value is accessed with a single index.

  • They can represent a line that start from the origin to the point in space.
  • Examples: the basis axes $[1, 0, 0], [0, 1, 0], [0, 0, 1]$ and generally any line in space like $[-2, 3, 5]$.
  • The origin is $[0, 0, 0]$.

Matrices#

Representation that consists of vectors. Possible vectors in this space are 3d vectors. A matrix value is accessed with two indices.

  • They can represent a 3d spece between the vectors: $$\begin{bmatrix}1 & 0 & 0 \\ 0 &1&0 \\ 0 & 0 & 1\end{bmatrix} consists\;of \;v_1=\begin{bmatrix}1\\0 \\ 0\end{bmatrix} \;v_2=\begin{bmatrix}0\\1 \\ 0\end{bmatrix} and \;v_3=\begin{bmatrix}0\\0\\1\end{bmatrix}$$
    $$\begin{bmatrix}2 & 2 & 2 \\ 3 & 5& 6 \\ 0 & 0 & 1\end{bmatrix} consists\;of \;v_1=\begin{bmatrix}2\\3 \\ 0\end{bmatrix} \;v_2=\begin{bmatrix}2\\5 \\ 0\end{bmatrix} and \;v_3=\begin{bmatrix}2\\6\\1\end{bmatrix}$$
  • The origin is: $$\begin{bmatrix} 0 & 0 & 0 \\ 0 &0&0 \\ 0 & 0 & 0 \end{bmatrix}$$
  • As in rank 2 spaces, same goes for transposing and orthogonality.
    • The following are rank 1 matrices because all their vectors are dependent (one can be formed from the others). They exist on the same line (45 angle between axes), and thus they do not span the whole 3d space. $$\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 & 2 \\ 1 & 2\\1 & 2 \end{bmatrix} , \begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3 \\\ 1 & 2 & 3\end{bmatrix} or \begin{bmatrix} 1 & 2 & 3 & 100 \\ 1 & 2 & 3 & 100\\ 1 & 2 & 3 & 100 \end{bmatrix} \dots $$
    • The following are rank 2 matrices because there is only two independent (orthogonal) vectors that can form a plane beween two axes, say x and y. Regardless of the values of $x$, all other vectors will be dependent on one of the two vectors and will exist on the same plane. $$ \begin{bmatrix} 0 & 1 \\ 1 & 0 \\ 0 & 0 \end{bmatrix} , \begin{bmatrix} 0 & 1 & x \\ 1 & 0 & x \\ 0 & 0 & 0\end{bmatrix} or \begin{bmatrix} 0 & 1 & x & x \\ 1 & 0 & x & x \\ 0 & 0 & 0 & 0\end{bmatrix} \dots$$
    • The following are rank 3 or full rank matrices because there are three independent vectors that can form 3d space. Regardless of the values of $x$, all other vectors will be dependent. $$ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}, \begin{bmatrix} 1 & 0 & 0 & x \\ 0 & 1 & 0 & x \\ 0 & 0 & 1 & x\end{bmatrix} or \begin{bmatrix} 1 & 0 & 0 & x & x\\ 0 & 1 & 0 & x & x\\ 0 & 0 & 1 & x & x\end{bmatrix} \dots$$

Rank 3 Tensors#

Representation that consist of matrices. See above. Rank 3 tensor value is accessed with three indices.

  • The mathematical notation for tensors is immature, but I believe we can adapt the notation from numpy library. $$ \begin{bmatrix}\begin{bmatrix} 1 \\ 1 \end{bmatrix}\end{bmatrix}, \begin{bmatrix}\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}\begin{bmatrix} 3 \\ 1 \\ 5 \end{bmatrix}\end{bmatrix},\; \begin{bmatrix}\begin{bmatrix} 1 & 2 \\ 1 & 2\\1 & 2 \end{bmatrix}\begin{bmatrix} 3 & 2 \\ 1 & 5\\14 & 0 \end{bmatrix}\end{bmatrix} $$
    $$\begin{bmatrix}\begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3 \\\ 1 & 2 & 3\end{bmatrix}\begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3 \\\ 1 & 2 & 3\end{bmatrix}\begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3 \\\ 1 & 2 & 3\end{bmatrix}\end{bmatrix} or \begin{bmatrix}\begin{bmatrix} 1 & 2 & 3 & 100 \\ 1 & 2 & 3 & 100\\ 1 & 2 & 3 & 100 \end{bmatrix}\end{bmatrix} \dots $$

  • For example, in the following tensor $A$ with the shape (2,1,3), the element $A_{1,0,2} = 99$: $$A = \begin{bmatrix}\begin{bmatrix} 0 \\ 1 \end{bmatrix} \begin{bmatrix} 5 \\ 3 \end{bmatrix}\begin{bmatrix} 99 \\ 4 \end{bmatrix}\end{bmatrix}$$

© 2022