> For the complete documentation index, see [llms.txt](https://tony-ng-1.gitbook.io/matrices-and-linear-algebra-fundamentals/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tony-ng-1.gitbook.io/matrices-and-linear-algebra-fundamentals/types-of-entities.md).

# Introduction to Matrices (Pt. 2)

## Types of entities

|            Example           | Math/Physics | <p>Computer <br>Science</p> |
| :--------------------------: | :----------: | :-------------------------: |
|             \[1]             | Scalar (1-D) |         Number (0-D)        |
|            \[1, 2]           | Vector (2-D) |         Array (1-D)         |
| <p>\[1, 2]</p><p>\[3, 4]</p> | Matrix (3-D) |         Matrix (2-D)        |
|      \[\[1, 2], \[3,4]]      | Tensor (N-D) |         Tensor (N-D)        |

#### Dimensions

Poh-**tay**-toh, poh-**tah**-toh 🥔... ...&#x20;

Toh-**may**-toh, toh-**mah**-toh 🍅... ...

With all confusing jargons aside, dimensions can be a difficult concept to wrap around. Despite having 7D dried mangoes and even 9D cinemas, it is difficult (actually impossible 🤪) to visualize even 4 dimensions.

You might have also noticed the difference in the *amount of dimensions* referred to by either via the **Math/Physics vs Computer Science** view.

This is because **Math/Physics** often work with what they refer to as the **Vector Space** (don't really claim to know this very well). Thus, the *dimensions* being referred to are the tools for the plotting of 2-D to 3-D vectors, to better understand topics such as forces of either push, pull, shear or rotation.

However, for **Computer Science**, the *dimensions* referred to here are often just a description about the arrays. Hence, instead of the former key purpose of plotting and visualization, this simply describes the level of complexity of a given array.

{% hint style="info" %}
E.g., it may be helpful to describe the position of an element of a **2-D array (matrix)** via both its *row and column number*, whereas it is not that necessary for a scalar (unnecessarily wrong)
{% endhint %}

Following this GitBook will be focusing on **matrices**, but however, the following entities are also a good mentioning/starting points.

{% tabs %}
{% tab title="Scalar" %}

### Scalar

A scalar is a **single-value** number. This entity is often applied to a vector, and its action is called **scaling**.&#x20;

* For example, the value **3** is a scalar
* It should also not be represented with brackets
* It has 0 dimensions, as it is not meaningful to express it in terms of either rows or columns&#x20;
* There are also no other possible variations to express a scalar
  {% endtab %}

{% tab title="Vector" %}

### Vector

In Physics, a vector has both the characteristic of a *magnitude* and a *direction*. A vector of **\[2, 7]** is able to tell the *direction* from the way it points, from the origin \[0, 0] to \[2, 7], and the *magnitude* through computing its *Euclidean Distance* (or alternatively the hypotenuse using *Pythagoras Theorem*).

In contrast to a scalar, a vector consist of

* **More than one element**, and&#x20;
* There are **two possible variation** of expression

#### Row Vector

$$
\mathbf{v\_r } = \left\[\begin{array}
{rrr}
x\_1 & x\_2  & x\_3
\end{array}\right]
$$

A *row* vector has the size of **1 x n**.

#### Column Vector

$$
\mathbf{v\_c} = \left\[\begin{array}
{rrr}
x\_1\\
x\_2\\
x\_3
\end{array}\right]
$$

A *column* vector has the size of **m x 1**.
{% endtab %}
{% endtabs %}

### **More on the next page ⏭**
