What was the first work that showed someone (or something) inverted by passing through higher dimensions

Prompted by this question, I found myself wondering what the first work of science fiction was in which a character (or object) was inverted by passing through higher dimensions. Martin Gardner discussed the possibility on page 79 of Aha! Gotcha, published in 1982.

However, from the way Gardner describes the possibility, it seems like the idea must certainly be older, so that it had likely been discussed explicitly in fiction before that time.

The description in the linked question, from Spaceland by Rudy Rucker (a friend of Gardner's) differs slightly from Gardner's own, as depicted in the cartoon. One (Rucker's) involves moving outside the regular three space dimensions, being flipped over in a higher dimension, then returning. The other (Gardner's) involves staying within the three space dimensions of our universe, but having the universe itself curved and twisted in a higher dimension. However, the two possibilities are very similar, and it would in fact be interesting to know which idea came first.

• I don't know if it's earliest, but mention must be made of Zelazny's Doorways in the Sand. Commented Jun 15, 2023 at 19:16
• @DavidW AFAIK it was not dimension but inverting device Commented Jun 15, 2023 at 19:18
• @YaroslavKornachevskyi I'm pretty sure the Rhennius device is exactly what's being discussed here, something that can create a reversal in one or more dimensions of a three-dimensional object by passing it through a higher-dimensional space. Note that it is not limited to left-right transpositions; it can also transpose inside to outside. (As Marv found out.) Commented Jun 15, 2023 at 19:28
• @DavidW I just don't remember about higher dimensions, will have to reread it again =) Commented Jun 15, 2023 at 22:04
• @YaroslavKornachevskyi The device in Doorways was known simply as an "N-axis inverter." There was IIRC no further description of its workings. Passing an object through it would mirror image it or turn it inside out alternately...it wasn't necessary for it to be the same object (see close of climax). Commented Jun 16, 2023 at 14:05

An early one is H.G. Wells' "The Plattner Story" (1896), in which a character is catapulted into an alternate universe by a chemical explosion (with some suggestion it might be a sort of afterlife dimension, probably influenced by contemporary ideas in Spiritualism about the dead existing in the fourth dimension), and when he returns to our dimension his body is inverted. It was reprinted in the 1897 book The Plattner Story and Others which is available on wikisource here, this is the passage about Plattner's body:

If you, as an ordinary careless person, were to bare his chest and feel his heart beating, you would probably find it quite like the heart of anyone else. But here you and the trained observer would part company. If you found his heart quite ordinary, the trained observer would find it quite otherwise. And once the thing was pointed out to you, you too would perceive the peculiarity easily enough. It is that Gottfried's heart beats on the right side of his body.

Now, that is not the only singularity of Gottfried's structure, although it is the only one that would appeal to the untrained mind. Careful sounding of Gottfried's internal arrangements, by a well-known surgeon, seems to point to the fact that all the other unsymmetrical parts of his body are similarly misplaced. The right lobe of his liver is on the left side, the left on his right; while his lungs, too, are similarly contraposed. What is still more singular, unless Gottfried is a consummate actor, we must believe that his right hand has recently become his left. Since the occurrences we are about to consider (as impartially as possible), he has found the utmost difficulty in writing, except from right to left across the paper with his left hand. He cannot throw with his right hand, he is perplexed at meal times between knife and fork, and his ideas of the rule of the road—he is a cyclist—are still a dangerous confusion. And there is not a scrap of evidence to show that before these occurrences Gottfried was at all lefthanded.

There is yet another wonderful fact in this preposterous business. Gottfried produces three photographs of himself. You have him at the age of five or six, thrusting fat legs at you from under a plaid frock, and scowling. In that photograph his left eye is a little larger than his right, and his jaw is a trifle heavier on the left side. This is the reverse of his present living conditions. The photograph of Gottfried at fourteen seems to contradict these facts, but that is because it is one of those cheap "Gem" photographs that were then in vogue, taken direct upon metal, and therefore reversing things just as a looking-glass would. The third photograph represents him at one-and-twenty, and confirms the record of the others. There seems here evidence of the strongest confirmatory character that Gottfried has exchanged his left side for his right. Yet how a human being can be so changed, short of a fantastic and pointless miracle, it is exceedingly hard to suggest.

...

There is no way of taking a man and moving him about in space, as ordinary people understand space, that will result in our changing his sides. Whatever you do, his right is still his right, his left his left. You can do that with a perfectly thin and flat thing, of course. If you were to cut a figure out of paper, any figure with a right and left side, you could change its sides simply by lifting it up and turning it over. But with a solid it is different. Mathematical theorists tell us that the only way in which the right and left sides of a solid body can be changed is by taking that body clean out of space as we know it,—taking it out of ordinary existence, that is, and turning it somewhere outside space. This is a little abstruse, no doubt, but anyone with any knowledge of mathematical theory will assure the reader of its truth. To put the thing in technical language, the curious inversion of Plattner's right and left sides is proof that he has moved out of our space into what is called the Fourth Dimension, and that he has returned again to our world. Unless we choose to consider ourselves the victims of an elaborate and motiveless fabrication, we are almost bound to believe that this has occurred.

Incidentally it's generally thought that Wells' stories involving fictional discussions of a fourth dimension (this one as well as The Time Machine) were influenced by the writings of the mathematician and writer Charles Howard Hinton, see the comments at the end of this article for example. Hinton had written about the idea of time as a fourth dimension in his article "What is the Fourth Dimension?" (1880), and in chapter III of his 1884 piece "A Picture of Our Universe", available in the book Scientific Romances here, he had a nonfictional discussion of this sort of inversion of a three-dimensional being rotated in the fourth dimension:

Now if we stand in front of a mirror we see the image of ourselves. If we were to go round the mirror and take behind it the position which our image seemed to occupy, we should not be able to make ourselves coincide with it. In the mirror opposite to our left hand is the image of our left hand; but if we passed round, our right hand would be in the place in which we imagined we saw the image of our left hand. And thus we cannot make ourselves coincide with our image. But by a rotation in four-dimensional space we could put ourselves so as exactly to coincide with our image.

• Kudos for the discovery. I always find it interesting that authors seek a "trendy" cause for such things: a few years before Wells it would have been magnetism or steam, a few years later it would have involved lots of electric sparks and these days it would be cybersomething or AI. Commented Jun 16, 2023 at 7:38
• It is perhaps interesting to know that some prominent physicists (at least one comes to mind, Lodge IIRC but he may not have been the only one) who believed in spiritualism and ironically but perhaps not too suprisingly it was his knowledge of scientific advances, in particular transmission of information via invisible radio waves, that made Lodge receptive. He went "all-in" claiming to be in touch with a son who died in ww1 and who supposedly reported that in the afterlife they received cigars and whiskey. Commented Jun 16, 2023 at 16:17

The earliest I can think of is Arthur C. Clarke's "Technical Error" (1946), in which an accident at a power plant inverts one of the workers.

Quoting the plot synopsis from Wikipedia:

The first power plant to exploit superconductivity has been built, and worker Richard Nelson is "laterally inverted" following an accidental short-circuit in the facility. Nelson finds himself wearing his wedding ring on the wrong hand. Written texts appear mirror-inverted, and coins and his technical diary have been affected. Nelson begins to starve; normal food does not nourish him because most biological molecules are chiral. A chemist, Prof. Vandenburg, develops mirror-inverted parallels of nutrients required by Nelson.

Ralph Hughes, the station's chief physicist, investigates the incident. He discovers that Nelson has traveled through a fourth spatial dimension.

• Gets the runner-up prize due to (at least) the earlier Wells story. However this is probably the earliest fictional reference to superconductivity... Commented Jun 16, 2023 at 7:39
• Came here to say this. Commented Jun 16, 2023 at 14:43
• @MarkMorganLloyd: However this is probably the earliest fictional reference to superconductivity... – Given that superconductivity was discovered and published in 1911, I would find that surprisingly late. Commented Jun 17, 2023 at 9:03

I just remembered that Gardner himself wrote a humorous science fiction story in which a higher-dimensional inversion (albeit a slightly different kind of inversion) nearly happens: "The No-Sided Professor," published in Esquire in 1947. It was the title story in a 1982 collection of Gardner's fiction (beginning on page 46).

The relevant bit comes at the very end of the story.

Simpson was unhurt, but Slapenarski’s jaw had been broken. I took him to Billings Hospital, near the University of Chicago, and in his room late that night he told me what he thought had happened. Apparently Simpson had entered a higher dimension (very likely the fifth) on level ground.

When he recovered consciousness he unraveled himself and immediately returned to our space as a normal three-dimensional torus with outside and inside surfaces. But Slapenarski had worse luck. He had landed on some sort of slope. There was nothing to see—only a gray, undifferentiated fog—but he had the distinct impression of rolling down a hill.

He tried to keep a grip on his nose but was unable to maintain it. His right hand slipped free before he reached the bottom of the incline. As a result, he unfolded himself and tumbled back into three-dimensional space and into the middle of Delores’ Egyptian routine.

...

“It was fortunate,” he said, “that both Simpson and I released our right hand before the left.”