Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Inner Product


Symbolic visualization of ⟨u, v⟩ (vectors) and ⟨A, B⟩_F (Frobenius), step by step.

Scenario?An inner product takes two objects of matching shape, multiplies their entries pairwise, and sums the results into a single scalar. The same idea applies to vectors (the classical dot product) and to matrices (the Frobenius inner product) — the operation is the same, only the shape of the operands differs.
Vector length
u, vlength4
u1×4
u1,1
u1,2
u1,3
u1,4
,
v1×4
v1,1
v1,2
v1,3
v1,4
=
u,v
4Σk=1ukvk
Step 1 / 6

Step explanations

1Vector inner product
The inner product of two vectors of the same length pairs them index by index, multiplies, and sums to a single scalar.
u, v⟩ = u1v1 + u2v2 + u3v3 + u4v4







Getting Started with the Visualizer

Pick a scenario and a shape, then watch the inner product build up term by term.

• Use the Scenario pills to switch between Vectors u,v\langle u, v \rangle and Matrices A,BF\langle A, B \rangle_F
• In the vectors scenario, set the shared length of uu and vv (2 to 10)
• In the matrices scenario, set the shared dimensions of AA and BB (2×2 to 5×5)
• Hover the ? icons for explanations of the inner product itself and the same-shape requirement
• Use the scene player below to step, play, pause, change speed, and scroll the step log

The point of having one tool for both scenarios is to make the unity explicit: same operation, different operands.
Learn More

The Vectors Scenario

In the vectors scenario, uu and vv are shown as row vectors of length nn, and the result u,v\langle u, v \rangle appears as a single boxed scalar.

• Each scene pairs one entry uku_k with vkv_k, highlighting both and drawing two arrows into the result box
• The running sum above the canvas updates term by term — counted terms turn green, the current term is blue and bold, pending terms stay grey
• The result box shows a stacked Σ\Sigma notation with an upper bound that advances as more terms are counted
• Final scene highlights every entry of both vectors and the completed sum

This is the textbook dot product, broken into its nn pairwise products.
Learn More

The Matrices Scenario

In the matrices scenario, AA and BB are shown as m×nm \times n grids, and the result A,BF\langle A, B \rangle_F appears as a single boxed scalar with the Frobenius subscript FF.

• Each scene pairs one entry ai,ja_{i,j} with bi,jb_{i,j} in row-major order, highlighting both and drawing arrows into the result box
• The running sum above the canvas grows by one ai,jbi,ja_{i,j} b_{i,j} term per step, color-coded the same way as in the vectors scenario
• Total steps equal m×nm \times n — every cell of both matrices contributes exactly one product
• Final scene highlights every cell of both matrices in green and presents the completed sum

The Frobenius inner product is exactly the dot product of the matrices "flattened" into long vectors of length m×nm \times n.
Learn More

Reading the Running Sum

The expression above the canvas is the inner product written out as a sum of individual product terms, with per-term color coding.

Grey terms are pending — not yet computed
Blue, bold marks the term being computed in the current scene
Green terms have already been counted
• On the final scene, every term is green and the sum is complete

This running sum is the bridge between the visual pairing (highlights and arrows on the canvas) and the algebraic formula. By the end of the animation, you have seen every term in the sum named, paired, and counted.
Learn More

What an Inner Product Is

An inner product is a rule that takes two objects of the same shape and returns a scalar by pairing entries, multiplying, and summing.

For vectors of length nn:
u,v=k=1nukvk\langle u, v \rangle = \sum_{k=1}^{n} u_k v_k


For m×nm \times n matrices (the Frobenius inner product):
A,BF=i=1mj=1nai,jbi,j\langle A, B \rangle_F = \sum_{i=1}^{m} \sum_{j=1}^{n} a_{i,j} b_{i,j}


Both formulas implement the same idea: walk through every pair of corresponding entries, multiply them, sum the products. The Frobenius version is the dot product applied to the matrices read as mnmn-long vectors.

For comprehensive theory, see inner product spaces.
Learn More

Key Properties

Every inner product, whether on vectors or matrices, satisfies four defining properties.

Symmetry: u,v=v,u\langle u, v \rangle = \langle v, u \rangle
Linearity in the first argument: αu+βw,v=αu,v+βw,v\langle \alpha u + \beta w, v \rangle = \alpha \langle u, v \rangle + \beta \langle w, v \rangle
Positive definiteness: u,u0\langle u, u \rangle \geq 0, with equality only when u=0u = 0
Scalar output: the result is always a single number, never a vector or matrix

From these four properties everything else follows — norms (u=u,u\|u\| = \sqrt{\langle u, u \rangle}), angles (cosθ=u,v/(uv)\cos\theta = \langle u, v \rangle / (\|u\| \|v\|)), orthogonality (u,v=0\langle u, v \rangle = 0), and projections.
Learn More

Why It Matters

The inner product is the single most useful operation in linear algebra because so many other concepts are defined through it.

Length of a vector: u=u,u\|u\| = \sqrt{\langle u, u \rangle}
Angle between vectors: cosθ=u,v/(uv)\cos\theta = \langle u, v \rangle / (\|u\| \|v\|)
Orthogonality: uvu \perp v exactly when u,v=0\langle u, v \rangle = 0
Projection of uu onto vv: projvu=u,vv,vv\text{proj}_v u = \frac{\langle u, v \rangle}{\langle v, v \rangle} v
Gram-Schmidt orthogonalization, least squares, and Fourier expansions all run on inner products

The Frobenius inner product extends all of this to matrices — matrix norms, matrix angles, orthogonal matrix decompositions, and the trace formula A,BF=tr(ATB)\langle A, B \rangle_F = \text{tr}(A^T B).
Learn More

Worked Example

Vectors: take u=(1,2,3)u = (1, 2, 3) and v=(4,1,2)v = (4, -1, 2).

u,v=(1)(4)+(2)(1)+(3)(2)=42+6=8\langle u, v \rangle = (1)(4) + (2)(-1) + (3)(2) = 4 - 2 + 6 = 8


Matrices: take A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and B=(0112)B = \begin{pmatrix} 0 & 1 \\ -1 & 2 \end{pmatrix}.

A,BF=(1)(0)+(2)(1)+(3)(1)+(4)(2)=0+23+8=7\langle A, B \rangle_F = (1)(0) + (2)(1) + (3)(-1) + (4)(2) = 0 + 2 - 3 + 8 = 7


In both cases, the calculation is "pair, multiply, sum" — no row-column gymnastics, no transposition. Set the visualizer to length 3 for the vector case or to 2×22 \times 2 for the matrix case and step through to see the same arithmetic animated.
Learn More

Common Mistakes

A handful of recurring mistakes appear when learning inner products.

Confusing inner product with matrix multiplication — the inner product returns a scalar; matrix multiplication returns a matrix. uTvu^T v is a scalar (essentially the inner product), while uvTu v^T is a rank-1 outer product matrix
Forgetting the same-shape requirement — you cannot take the inner product of a 3-vector and a 4-vector, or of a 2×32 \times 3 and a 3×23 \times 2 matrix
Conjugation in the complex case — for complex vectors, the inner product is u,v=ukvk\langle u, v \rangle = \sum \overline{u_k} v_k with conjugation on one argument. The visualizer covers the real case
Treating Frobenius as something exotic — it is just the dot product of the matrices read as long vectors
Mixing up "inner" and "outer" — outer product takes two vectors and returns a matrix; inner product takes two vectors and returns a scalar
Learn More

Related Concepts

Dot product — the inner product on real vectors; the vectors scenario of this tool.

Frobenius inner product — the matrix version; the matrices scenario of this tool.

Outer product — the dual operation that takes two vectors and returns a matrix.

Norm — the length of a vector or matrix, defined through the inner product as x=x,x\|x\| = \sqrt{\langle x, x \rangle}.

Orthogonality — the condition u,v=0\langle u, v \rangle = 0, central to Gram-Schmidt and orthogonal decompositions.

Projection — the component of one vector along another, computed with the inner product.

Cauchy-Schwarz inequalityu,vuv|\langle u, v \rangle| \leq \|u\| \|v\|, a universal bound on inner products.

Matrix multiplication — uses inner products of rows and columns as its building block.
Learn More