A person who is in an uninhabited region when the Sabbath begins may walk anywhere within a radius of 2004 cubits from his initial position, but is not allowed to go outside that region (397:1-2;401:1;405:3). If he is in a private domain that has an area of at most 5000 square cubits or was made for residential purposes, and that existed before the Sabbath began (see 403:1), his radius of 2000 cubits begins outside it (396:2). A person’s possessions must not be moved outside the region where he is permitted to walk; see 397:3-18.
In a built-up area, houses that are within 70-2/3 cubits of one another are treated as a unit; a rectangle oriented in the cardinal directions (unless the inhabited area is itself rectangular; see 398:1) is drawn 70-2/3 cubits beyond them (see 398:5), and a Sabbath boundary of 2000 cubits is measured from this rectangle (398:1-8), provided the rectangle is nowhere further than 2000 cubits from the houses (see 398:4). On the definition of a house in this connection see 398:6,10; on treating a body of water as part of a built-up area see 398:9 and 402:1; on measuring from a city wall see 398:11. On the process of measuring the Sabbath boundary, particularly when the ground is not level, see 399:1-11; on whether the Sabbath boundary is applicable ten or more handsbreadths above the ground or in a body of water see 404:1.
A person who is inside the Sabbath boundary of a built-up area when the Sabbath begins is treated like a resident of the area, provided he intended to go there (400:1;405:2-3). A person whose Sabbath boundary contains a built-up area may measure his boundary from outside that area, and if it overlaps such an area, the entire area is included in his boundary; see 408:1.
A person (or object; see 401:1) who improperly goes outside his Sabbath boundary, even inadvertently or unwillingly, is restricted to a radius of four cubits (see 396:1;405:1-2); but if he is in a private domain, he may walk anywhere inside it and up to four cubits outside it (see 404:1; 405:6,8), and if he went out of his boundary inadvertently, under some circumstances he may go back into it (see 405:4-5;406:1). If he goes outside permissibly (for example, in an emergency; see 401:1;407:1,3), he has a radius of 2004 cubits from where he was permitted to go (see 407:1-3), and if this allows him to go back inside, he recovers his original boundary (see 407:2-3). An object that is taken outside its Sabbath boundary and returned to it recovers its original boundary; see 405:9. On a person who goes outside his Sabbath boundary in a ship see 404:1 and 405:7.
A person who has a religious or urgent reason for doing so (see 415:1) may leave food at a point inside his Sabbath boundary (see 408:4;409:5-6; 411:1) before the Sabbath (or holiday; see 416:1-5) begins (see 415:2-3) and declare that point as the center of his Sabbath boundary; he may then walk anywhere within a radius of 2004 cubits from that point, even though he was not there when the Sabbath began (408:1;409:7-10;412:1;413:1;414:1-2); and if that point is in a private domain, his radius begins outside it (see 408:2-3). The food is called an ERUV TECHUMIN; it must be left in a place where the person could have had access to it at twilight (see 409:1-6;416: 2-3). When the food is deposited, the blessing “…Who commanded us about an ERUV” is recited (415:4). A person who is traveling (see 409:13;410:1-3) may designate a known point as the center of his Sabbath boundary, provided he is within 2000 cubits of that point and could have reached it before the Sabbath began (see 409:11-12).
Shulchan Aruch, Copyright (c) 2000 Project Genesis, Inc.