Tensors

← Back to Learn

Vectors

A vector is an ordered list of numbers. They can represent quantities with both magnitude and direction.

Example of a 2D vector: \(\vec{v} = (3, 4)\)

Operations

a
b
a + b
a − b
Drag the colored dots to move vectors.


    
    
Interactive vector addition/subtraction

Matrices

A matrix is a rectangular array of numbers arranged in rows and columns.

Example: $$ A = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} $$

Operations

Eigenvalues and Eigenvectors

They satisfy: $$A \vec{v} = \lambda \vec{v}$$

i

Eigenvalues are central in many algorithms. For example, they underpin techniques like the Variational Quantum Eigensolver (VQE).

Tensors

Tensors generalize vectors (1D) and matrices (2D) to higher dimensions.

i

Tensors are fundamental to understanding data structures in computing and physics. In quantum computing, they relate to how we represent multiple qubits.

Tensor Products

The tensor (Kronecker) product of two matrices \(A\) and \(B\) is denoted \(A \otimes B\).

Example: $$ \begin{bmatrix}a & b \\ c & d\end{bmatrix} \otimes \begin{bmatrix}e & f \\ g & h\end{bmatrix} = \begin{bmatrix} ae & af & be & bf \\ ag & ah & bg & bh \\ ce & cf & de & df \\ cg & ch & dg & dh \end{bmatrix} $$

i

Tensor products are used to build larger spaces from smaller components. In quantum computing, they describe how multi-part systems combine.

Practice

1) Compute \((2,3) + (4,1)\).

\((6,4)\)

2) Find the dot product of \((1,2,3)\) and \((4,5,6)\).

\(1*4 + 2*5 + 3*6 = 32\)

3) For matrix \(A = \begin{bmatrix}2 & 0 \\ 0 & 3\end{bmatrix}\), what are its eigenvalues?

\(2\) and \(3\)

4) Compute the tensor product of \((1,0)\) and \((0,1)\).

\((0,1,0,0)\)