bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/AI/Mathematics
AI•Mathematics

Tensors

A Tensor is a

N-dimensional Matrix

Formula

A Scalar is a 0 - dimensional tensor
A Vector is a 1 - dimensional tensor
A Matrix is a 2 - dimensional tensor

A

Tensor is a generalization of

Vectors and

Matrices to higher dimensions.

Scalar

Vector(s)

Matrix

Tensor

Tensor Ranks

The number of directions a tensor can have in a N -dimensional space, is called the Rank of the tensor.

The rank is denoted

R. A Scalar is a single number.

It has 0 Axes

It has a

Rank of 0

Formula

It is a 0 - dimensional Tensor

A Vector is an array of numbers.

It has 1 Axis

It has a

Rank of 1

Formula

It is a 1 - dimensional Tensor

A

Formula

Matrix is a 2 - dimensional array.

It has 2 Axis

It has a

Rank of 2

Formula

It is a 2 - dimensional Tensor

Real Tensors

Technically, all of the above are tensors, but when we speak of tensors, we generally speak of matrices with a dimension larger than 2 (

Formula

R > 2

).

Linear Algebra in JavaScript

In linear algebra, the most simple math object is the

Scalar

const scalar = 1;

Another simple math object is the

Array

const array = [ 1, 2, 3 ];

Previous

Matrices