Skip to content
ToolUlkaa Tool
All tools

Mathematics

Percentage CalculatorFraction CalculatorEquation SolverTensorMatrix CalculatorUnit ConverterNumber Base ConverterDerivative CalculatorIntegral CalculatorLimit CalculatorAlgebra CalculatorQuadratic Formula CalculatorFactoring CalculatorLogarithm CalculatorSquare Root CalculatorLong Division CalculatorSignificant Figures CalculatorLCM and GCF CalculatorPrime Factorization CalculatorTriangle CalculatorPythagorean Theorem CalculatorSlope CalculatorArea CalculatorVolume CalculatorScientific CalculatorGraphing Calculator

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Mathematics

Kronecker Product Calculator

The Kronecker product of two matrices, with block layout.

Operation

Use nested brackets, like [[1, 2], [3, 4]], and the shape is worked out. Or give a flat list and a shape (one dimension may be -1).

Result

Kronecker product

Rank
2
Shape
[4, 4]
Elements
16
in R4×4\text{in } \mathbb{R}^{4 \times 4}in R4×4
[0102102003043040]\begin{bmatrix} 0 & 1 & 0 & 2 \\ 1 & 0 & 2 & 0 \\ 0 & 3 & 0 & 4 \\ 3 & 0 & 4 & 0 \end{bmatrix}​0103​1030​0204​2040​​
[[0, 1, 0, 2], [1, 0, 2, 0], [0, 3, 0, 4], [3, 0, 4, 0]]
  1. Tools
  2. Mathematics
  3. Tensor Calculator
  4. Kronecker Product Calculator

About Kronecker Product Calculator

This Kronecker product calculator multiplies two matrices or tensors the way numpy.kron does, and shows the resulting shape and values. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.

For an m by n matrix A and a p by q matrix B, the Kronecker product is an mp by nq matrix made of blocks: each entry of A scales a full copy of B. The result of the 2 by 2 identity with a 2 by 2 matrix is a 4 by 4 block-diagonal matrix. The Kronecker product is not commutative: A ⊗ B and B ⊗ A hold the same entries in a different arrangement.

The page follows NumPy padding for tensors of different rank: the lower-rank shape is padded with leading 1s and then the axis sizes multiply. A 1 by 2 matrix with a plain vector of length 2 therefore gives shape [1, 4]. Two vectors give a vector, so [1, 2] with [3, 4, 5] returns the six numbers 3, 4, 5, 6, 8, 10. Entries must be numbers.

How to use Kronecker Product Calculator

  1. 1Pick a mode: Shape and reshape, Tensor product, Kronecker product, or Einsum.
  2. 2Enter tensor A as nested brackets like [[1, 2, 3], [4, 5, 6]], or as a flat list of numbers with a shape such as 2, 3 in the shape box. One shape entry may be -1.
  3. 3For the product and einsum modes, enter tensor B the same way.
  4. 4In Shape mode, type a target shape to reshape to (for example 3, -1) and optionally an axes order for transpose (for example 1, 0).
  5. 5In Einsum mode, write the expression, such as ij,jk->ik, or pick an example chip: matrix product, trace, diagonal, transpose or a three-matrix chain. One box appears for each operand, labelled with its axes.
  6. 6Read the rank, shape and element count above each result, and the values below as nested brackets.

Features

  • Shape inference from nested brackets, or a flat list plus a shape.
  • Reshape with one -1 dimension worked out automatically.
  • Transpose with reversed axes by default, or a custom axes order for any rank.
  • Tensor (outer) product whose shape is the shape of A followed by the shape of B.
  • Kronecker product with NumPy-style padding, so a vector and a matrix can be combined.
  • Einsum with one, two or three operands: the trace (ii->), the diagonal (ii->i), the transpose (ij->ji), the matrix product, a three-matrix chain (ij,jk,kl->il), batch products and more, with an implicit output when you leave off the arrow.
  • Each tensor box is labelled with the axes the expression gives it, and the expression is shown as a KaTeX formula.
  • Shapes and small results are typeset with KaTeX, for example the shape as R with a superscript of 2 by 3 and a matrix as a bracketed array.
  • A size guard: an einsum over 10 million multiply-adds is refused with the exact count, and one over 100,000 runs in a Web Worker so the page stays responsive.
  • Readable errors for ragged lists, non-numbers, mismatched sizes and bad axes.
  • Rank, shape and element count shown for every result, and values printed as nested brackets rounded to nine decimals.

Kronecker product

Each entry of A multiplies a whole copy of B, and the copies are laid out in the pattern of A.

A ⊗ B = [ a11·B  a12·B ]
        [ a21·B  a22·B ]
shape = (m·p) × (n·q)

Worked examples

  • A = [[1, 2], [3, 4]], B = [[0, 1], [1, 0]] → gives [[0, 1, 0, 2], [1, 0, 2, 0], [0, 3, 0, 4], [3, 0, 4, 0]], shape [4, 4]

  • A = [[1, 0], [0, 1]], B = [[1, 2], [3, 4]] → gives [[1, 2, 0, 0], [3, 4, 0, 0], [0, 0, 1, 2], [0, 0, 3, 4]]

    The identity matrix places one copy of B on each diagonal block.

  • A = [1, 2], B = [3, 4, 5] → gives [3, 4, 5, 6, 8, 10], shape [6]

Privacy: how it works

  • All arithmetic is done by TypeScript code in your browser tab. There is no network request when you calculate, no library is downloaded to do it, and nothing is stored.

Tips

  • Use -1 in a reshape to let the calculator fill in one dimension. A 24-element tensor reshaped to 4, -1 becomes shape [4, 6].
  • If a reshape fails, multiply your target dimensions and compare with the element count shown for tensor A.
  • To check an einsum string, try tiny tensors with distinct values, then compare the rank and shape before the values.
  • A custom transpose order lists the old axes in their new positions. For shape [2, 3, 4], the order 1, 0, 2 gives shape [3, 2, 4].

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your values are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your values are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

What size is a Kronecker product?

For A of size m by n and B of size p by q, it is mp by nq. Two 2 by 2 matrices give a 4 by 4 matrix.

Is the Kronecker product the same as the tensor product?

They contain the same products. The tensor (outer) product keeps all the axes, giving shape [2, 2, 2, 2] for two 2 by 2 matrices, while the Kronecker product arranges them into a single 4 by 4 matrix.

Is it commutative?

No. A ⊗ B generally differs from B ⊗ A, although the two are related by a permutation of rows and columns.

More Tensor Calculator pages

  • Tensor CalculatorCheck shapes, reshape and transpose, and compute tensor products, Kronecker products and einsum contractions.
  • Tensor Product CalculatorThe tensor product of two tensors, with the result shape worked out.
  • Tensor Shape CalculatorShape, rank and element count of a tensor, plus reshape and transpose.
  • Einsum CalculatorEvaluate einsum expressions on one to three tensors and check your own.
  • Tensor Contraction CalculatorContract two tensors by summing over shared indices.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account