the reversal of a string
Reversing a string means writing it backwards, exactly like reading a word from right to left. The reverse of cat is tac, and the reverse of stressed is desserts. You keep all the same symbols; you just flip their order so the last becomes first and the first becomes last.
We write the reversal of a string w as w^R. Its definition can be given symbol by symbol: if w = a1 a2 ... an then w^R = an ... a2 a1. The empty string is its own reverse, ε^R = ε, and a single symbol is its own reverse too. Reversal interacts neatly with concatenation but with a twist: the reverse of a join is the join of the reverses in the opposite order, (xy)^R = y^R x^R, just as putting on socks then shoes reverses to taking off shoes then socks. Reversing twice gives back the original: (w^R)^R = w.
Reversal shows up whenever direction matters. A palindrome is exactly a string equal to its own reverse (w = w^R), like racecar. The class of regular languages is closed under reversal, meaning if a finite automaton can recognize a language then some finite automaton can recognize the reversed language, a fact that gives practice with proofs and with the closure-properties theme. So reversal is both a simple operation and a probe into what machines can do.
(abc)^R = cba. Reversal flips concatenation order: (ab . cd)^R = (abcd)^R = dcba = (cd)^R (ab)^R. A palindrome satisfies w = w^R, e.g. abba.
(xy)^R = y^R x^R: reversal swaps the order of the joined parts.
Order flips in (xy)^R = y^R x^R, not (xy)^R = x^R y^R. Reversing a concatenation also reverses which piece comes first.