A nearest point that is not there
Worth reading first: An index that is a pair · A bound that holds with probability.
Half of this collection rests on one theorem. Eckart and Young: the best rank-k approximation of a matrix in the Frobenius or spectral norm is its truncated singular value decomposition, the error is the next singular value, and — the part nobody states, because for matrices it needs no stating — the best one exists.
For an array with three or more indices it is false. Not approximately false, not false in a corner case: there are tensors whose distance to the set of rank-two tensors is exactly zero and which no rank-two tensor equals.
The example, which is eight numbers
With e₁ = (1, 0) and e₂ = (0, 1) in two dimensions, let
A = e₁⊗e₁⊗e₂ + e₁⊗e₂⊗e₁ + e₂⊗e₁⊗e₁
which is a 2 × 2 × 2 array with three entries equal to one and five equal to zero. Its rank is three: three rank-one terms are written above, and no two suffice.
Now consider, for each n,
A_n = n · (e₁ + e₂/n)⊗³ − n · e₁⊗³
which is a difference of two rank-one terms and therefore has rank at most two for every n. Expanding the cube,
A_n = A + (1/n)·(the three terms with two e₂’s) + (1/n²)·e₂⊗e₂⊗e₂
so ‖A_n − A‖ = √(3/n² + 1/n⁴), which goes to zero.
The infimum of the distance from A to the rank-two set is therefore zero, and A has rank three, so nothing in the set attains it. The set of tensors of rank at most two is not closed.
What that costs, in numbers
The hero figure plots both quantities. The residual falls like √3/n and the larger of the two rank-one terms grows like n·(1 + 1/n²)^{3/2}, so their product is
√(3 + 1/n²) · (1 + 1/n²)^{3/2}
which descends onto √3 from above: 1.7774 at n = 8, 1.73205 at n = 2048, a fall of 2.6 per cent across two and a half decades. That expression is what the assertion checks, rather than a constant, because the algebra hands over a formula and asserting “constant” where a formula exists is describing the picture instead of testing it.
The practical reading of a constant product is severe. Getting one digit closer to A costs a factor of ten in the size of the pieces being subtracted from one another, for ever. At n = 10¹⁶ the two terms are 10¹⁶ and the answer is their difference — which is the arithmetic this collection’s first field is about, and where the cancellation takes the whole answer.
The word that is missing, and the one that replaces it
What A has and A_n does not is a rank; what A_n has and A does not is membership of a set. The quantity that reconciles them has a name.
The border rank of a tensor is the least r such that it is a limit of tensors of rank at most r. For a matrix, border rank and rank are the same number — that is what closedness means. For A they are two and three, and the gap between them is the whole subject of this page.
Border rank is the more useful of the two for anything an algorithm does, because it is what a truncation can approach. Rank is the more useful for anything a decomposition claims, because it is what a decomposition returns. A field that could only quote one of them would be describing either the algorithms or the objects, and this collection’s habit of putting a computed number beside a claimed one requires both.
There is a third quantity, and it is the one every practical code actually uses. A numerical rank at a tolerance ε is the least r for which some rank-r tensor is within ε — which is a border rank in disguise, since the set being searched is the closure. So the object a code reports is not the rank of the tensor and is not a mistake; it is a different quantity, and this collection has an essay about the matrix version of exactly that confusion.
The rank of a 2 × 2 × 2 tensor is a sign
The example above is not an isolated construction. For arrays of this smallest interesting shape the rank is decided exactly, by a polynomial in the eight entries, with no iteration anywhere.
Take the two 2 × 2 slices A₀ and A₁ and form det(A₀ + λA₁), which is a quadratic c₀ + c₁λ + c₂λ². Its discriminant
Δ = c₁² − 4c₀c₂
is Cayley’s hyperdeterminant, and it decides the rank outright:
| Δ | real rank | what the pencil is doing |
|---|---|---|
| Δ > 0 | 2 | two distinct real roots, two real rank-one terms |
| Δ < 0 | 3 | a conjugate pair — the next essay is about this row |
| Δ = 0 | 3 | a repeated root, and the infimum is zero |
The example has A₀ = [[0, 1], [1, 0]] and A₁ = [[1, 0], [0, 0]], so det(A₀ + λA₁) = −1 identically: c₀, c₁ and c₂ are −1, 0 and 0, and Δ = 0. Its three unfoldings all have rank two, which is what separates the rank-three case from the rank-one one.
Why the matrix case has no analogue of this
It is worth being precise about what the matrix case has that this does not, because the difference is not that matrices are simpler.
The set of matrices of rank at most k is closed: it is the zero set of all (k+1) × (k+1) minors, which is a system of polynomial equations, and the zero set of polynomials is closed by definition.
The set of tensors of rank at most r is not a zero set of anything. It is the image of a polynomial map — take r triples of vectors, form the sum of their outer products — and the image of a polynomial map need not be closed. Its closure is a variety, and the difference between the image and its closure is exactly the tensors whose border rank is r and whose rank is more.
So the failure is not a defect in the definition of tensor rank; it is the ordinary behaviour of images of maps, and the matrix case is the accident. What makes the matrix case work is that rank-≤k matrices happen to be describable by equations as well as by a parametrisation, and nothing hands that over for three indices.
One more difference is worth naming because it is the one that bites in practice. For matrices, the rank-≤k set is irreducible and its dimension is known: k(m + n − k). For tensors, the set of rank-≤r tensors can have several components of different dimensions over the reals, which is what the next essay’s two typical ranks are a symptom of. So even the question how many parameters does a rank-r tensor have does not have one answer.
What it does to an algorithm
An optimisation over a set that does not contain its own limit points has a specific and recognisable failure, and it is not divergence.
The objective decreases, monotonically, for as long as anyone is prepared to wait. The parameters — here the rank-one terms — grow without bound. The two are in exact proportion, so the iterate keeps improving and the representation keeps degenerating, and neither an objective plot nor a residual test can tell that from slow convergence.
This collection has a name for that shape from its own hierarchy field: a quantity going to zero is one arithmetic event with two opposite meanings. Here it is a quantity going to zero that means the answer is being left behind rather than approached.
The field’s essay on alternating least squares measures it. What is worth carrying from here is that the phenomenon is geometric and not numerical: it is not a rounding effect, it does not go away in higher precision, and it is not a bad starting point. It is the set.
And what it does to a bound
The other consequence is that a whole class of statement stops being available.
For matrices, every low-rank approximation on this site is priced against the best one: the hierarchy
field’s blocks are compared with bestError, the randomised field’s sketches are compared with the
truncated decomposition, and the word quasi-optimal means within a factor of the best. All of that
needs the best to exist.
For tensor rank it does not, so the phrase has nothing to attach to. What replaces it is a different notion of rank — the multilinear rank, and the train ranks, which are ranks of ordinary matrices — for which the best does exist and the projection onto it is computable. Two essays on, that is exactly the repair: carry the algorithm across rather than the definition.
What survives
It is worth stating plainly what is not damaged, because the list is longer than the damage.
The Frobenius norm is still a norm and distances still mean what they mean. The unfoldings are still matrices and their singular values are still computable, exactly and cheaply. Every statement in the previous two essays about Kronecker structure is untouched, because a Kronecker sum is a matrix. And the tensor’s own entries are as available as they ever were.
What is damaged is one specific inference: there is a best approximation of this shape, therefore what an algorithm returns can be compared against it. That inference is used, unstated, in every low-rank argument this collection makes, and the rest of the field is about the two ways of restoring it — change the notion of rank until the set is closed, which is what the Tucker and train formats do, or accept the non-closedness and measure what an iteration does inside it, which is what the alternating-least-squares essay does.
What it means for a claim about data
One more consequence, and it is the one that reaches outside numerical linear algebra.
A CP decomposition is used because its factors are interpretable: the columns are supposed to be the components a measurement is a mixture of, and the whole reason for preferring it to a matrix factorisation is that they are recoverable rather than arbitrary. The last essay of this field measures that and finds it true.
What this page adds is the condition under which the sentence is meaningful at all. If the best rank-r approximation of the data does not exist, then the components a rank-r model would recover is not a well-formed phrase — there is no rank-r model that is nearest, so there is nothing for the recovered factors to be an estimate of. A fit that has entered a swamp is returning terms of size 10⁶ that cancel to within 10⁻³, and reading those terms as components is reading an artefact of where the iteration stopped.
The diagnostic is on the hero figure and costs nothing: report the size of the terms beside the residual. A model whose terms are the size of its data is a model; a model whose terms are a thousand times its data is a subtraction.
The refusal
The claim under test is the assumption every low-rank argument on this site has made without stating it, and the refusal has to be the other direction: not that the phenomenon exists, but that it does not happen everywhere.
If the classification reported rank three for every 2 × 2 × 2 tensor, the whole page would be a bug. So it is fed an ordinary rank-two tensor — a sum of two rank-one terms with disjoint supports, which is as far from the boundary as this shape allows — and required to refuse the claim that it has rank three.
That matters more than it looks. A phenomenon that applied to every tensor would be a statement about the definition rather than about the geometry, and the measured fact that the light region of the plane figure occupies most of the window is what makes the dark boundary a boundary.
The second refusal in the same file is aimed at the reading that most nearly works. The unfoldings of a tensor are matrices and their ranks are ordinary ranks, so it is tempting to take the largest of them as the tensor’s rank. It is fed the Δ < 0 tensor, whose unfoldings are all rank two and whose real rank is three, and required to fail.
At other settings
Reads more easily once this is understood
Essays that name this one as worth reading first.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A rank that is not a property of the tensor — both name border rank, eckart–young, hyperdeterminant, low-rank approximation, numerical rank, tensor rank, unfolding
- The orthogonality that cannot be diagonal — both name eckart–young, low-rank approximation, tensor rank, truncated svd, unfolding
- A block nobody can call sparse — both name eckart–young, low-rank approximation, numerical rank, truncated svd
- A decomposition made only of SVDs — both name eckart–young, low-rank approximation, truncated svd, unfolding
- A factorisation that is unique for once — both name low-rank approximation, tensor rank, truncated svd, unfolding
- An iteration that walks out of the set — both name border rank, ill posed problem, low-rank approximation, tensor rank
Named objects
A flat tag is an object no other essay names yet.
Border rankEckart–YoungHyperdeterminantIll posed problemLow-rank approximationNumerical rankSeparabilityTensor rankTruncated svdUnfolding