Search code examples
machine-learningmathdeep-learningtensorterminology

What is `Tensor` and how is it different from a vector?


I am beginner in machine learning and I am facing this question. Please provide me the simple example or content so that I can understand it in the best way.


Solution

  • If you are asking about the mathematical objects, then a tensor is something that holds values, some kind of table or array. A tensor has an order indicating on how many axis these values are arranged.

    For example:

    • A tensor of order 0 is simply a single scalar number.
    • A tensor of order 1 is a vector. Each element is numbered by one index.
    • A tensor of order 2 is a matrix. Each element has two indices, e.g. row and column.