It is easy to see that if $A\times B$ is homeomorphic to $A\times C$ for topological spaces $A$, $B$, $C$, then one may not conclude that $B$ and $C$ are homeomorphic (for example, take $C=B^2$, $A=B^{\infty}$). The question is: for which $A$ such conclusion is true? I saw long ago a problem that for $A=[0,1]$ it is not true, but could not solve it, and do not know, where to ask. Hence am asking here. The same question in other categories (say, metric spaces instead topological) also seems to have some sense.

3$\begingroup$ Just some references on cancellation in other categories: ams.org/mathscinetgetitem?mr=1319005, ams.org/mathscinetgetitem?mr=1843913, ams.org/mathscinetgetitem?mr=1383621, ams.org/mathscinetgetitem?mr=2507731 $\endgroup$ – Jonas Meyer May 30 '10 at 3:50

$\begingroup$ See also mathoverflow.net/questions/26001/… $\endgroup$ – Victor Protsak Jun 2 '10 at 9:50

$\begingroup$ There are some results in the category of posets, see link.springer.com/book/10.1007/9789400977983/page/1 , section 10.5 in link.springer.com/chapter/10.1007/9781461200536_10 and ams.org/journals/proc/200413212/S0002993904073393 . $\endgroup$ – Michał Kukieła Jun 13 '13 at 14:07
For $A=[0,1]$, let $B$ be the 2torus with one hole and $C$ be the 2disc with two holes.
The products $B\times[0,1]$ and $C\times[0,1]$ can be realized in $\mathbb R^3$: the former as a thickening of the torus, the latter in a trivial way. Each of these products is a handlebody bounded by the pretzel surface (the sphere with two handles). It is easy to deform one to the other "by hand".
In the category of topological spaces, you can't in general even cancel the twopoint discrete space. The only counterexample I know is a bit complicated though: Start with the disjoint union of two copies of the StoneCech compactification $\beta N$ of a countably infinite discrete space N, and glue them together along their remainders (i.e., identify each point p in one copy with the corresponding point in the other copy, except that you don't do this identification when p is in N). The resulting space, which I'll call B to match the notation in the question, has the curious property that, if you add one more isolated point to B, you get a space C that is not homeomorphic to B, but if you add a second isolated point then the result is homeomorphic to B. (The part about adding two isolated points is easy; just apply the successor map on N and its continuous extension on $\beta N$ to everything in sight, to make room for the two extra points  just as in Hilbert's hotel. The part about adding one point is not so easy. I believe it's done (in dual form) in Halmos's "Notes on Boolean Algebras.") Once you have these curious facts about B, it's easy to check that B and C, though not homeomorphic, become homeomorphic when multiplied by a 2point discrete space; the one extra point in C becomes two points, which can be absorbed into one of the copies of B.

2$\begingroup$ For a more elementary example see the paper referred to in Andy Putman's answer to this (related) question: mathoverflow.net/questions/133146/… . $\endgroup$ – Michał Kukieła Jun 25 '13 at 18:22
It is easy to see that if $A\times B$ is homeomorphic to $A\times C$ for topological spaces $A$, $B$, $C$, then one may not conclude that $B$ and $C$ are homeomorphic (for example, take $C=B^2$, $A=B^∞$). The question is: for which $A$ such conclusion is true?
Witold Rosicki has a lot of results of this sort (usually under some conditions on $B$ and $C$). For instance,
On decomposition of polyhedra into a Cartesian product of 1dimensional and 2dimensional factors
On uniqueness of decomposition of 4polyhedron into Cartesian product of the 2dimensional factors
On uniqueness of Cartesian products of surfaces with boundary (with J. Malešič, D. Repovš, A. Zastrow)
There also exist papers of a different flavor on this subject
All lens spaces have diffeomorphic squares (S. Kwasik, R. Schultz)
Noncancellation and a related phenomenon for the lens spaces (A. J. Sieradski)
As for nice examples, there exist manifolds $M$ such that $M\times I$ is homeomorphic a ball. For instance, Mazur's 4manifold, as described by Zeeman:
Start with $S^1\times I^3$. In the boundary $S^1\times S^2$, choose a knotted $S^1$ homologous to the first factor. Knotted means that $S^1$ is not isotopic to a 1sphere $S^1\times y$, $y\in S^2$. Form $M^4$ from $S^1\times I^3$ by attaching a handle to $S^1$ (i.e., attach a disk to $S^1$ and then fatten the disk so that its fattened boundary is identified with some chosen tubular neighbourhood of $S^1$ in $S^1\times S^2$). Form the cube $I^4$ by the same process, only omitting the knotting. The knotting ensures that $M^4\not\cong I^4$. But one extra dimension permits unknotting $M^4\times I\cong I^4\times I$ (by just untwisting the handle).
Zeeman also notes a parallel construction of Whitehead's example with surfaces $\times I$ (mentioned above by Sergei Ivanov): `Start with $S^0\times I^2$. In the boundary $S^0 \times S^1$, choose three linked $S^0$'s, each homologous to the first factor', etc.
A really cool cancellation theorem is about joins of polyhedra, rather than products (H. Morton):
If $A*B\cong A*C$, then either $B\cong C$ or else $A\cong pt*A'$, $B\cong pt*X$ and $C\cong S^0*X$ for some polyhedra $A'$ and $X$.
How about Bing's example: The cartesian product of a certain nonmanifold and a line is $E^4$. The `other' factor is the dogbone decomposition of threespace.
The question's been studied in the category of groups, too. R. Hirshon proved in [1] that finite groups can always be cancelled in direct products.
Hirshon mentions some other sufficient conditions for the cancellation theorem to hold. For instance, he says that in the treatise by L. Fuchs there is a proof of the fact that infinite cyclic abelian groups can also be cancelled (provided that either $B$ or $C$ is a commutative group).
References
[1] R. Hirshon, On Cancellation in Groups, Amer. Math. Monthly. 76 (9) (1969), pp. 10371039.

4$\begingroup$ For canceling a finite group, isn't this just Krull–(Remak–)Schmidt theorem? (en.wikipedia.org/wiki/KrullSchmidt_theorem) By the way, according to MR, in the same paper Hirshon gave an example where infinite cyclic group $\mathbb{Z}$ cannot be canceled. $\endgroup$ – Victor Protsak May 30 '10 at 5:13

2$\begingroup$ The review of Walker, Elbert A. Cancellation in direct sums of groups. Proc. Amer. Math. Soc. 7 (1956), 898902, ams.org/mathscinetgetitem?mr=81440, written by Kaplansky, gives the history. $\endgroup$ – Victor Protsak May 30 '10 at 5:26

2$\begingroup$ KrullSchmidt applies when all the groups involved are finite. Hirshon's result is about just the canceled group being finite. He proves more in his later paper "Cancellation of Groups with Maximal Condition", Proc. AMS 24(2), 401403. $\endgroup$ – Steve D Jun 5 '10 at 9:45