Minecraft wiki entry for Redstone_components, associated text: When placed, a powered rail configures itself to line up with adjacent rails, powered rails, and detector rails, as well as such adjacent rails one block up. If there are two such adjacent rails on non-opposite sides, or three or more such adjacent rails, a powered rail lines up in the east-west direction. If there are no such adjacent rails, a powered rail lines up in the north-south direction. If a rail it would line up with is one block up, a powered rail slants upward toward it (with multiple options to slant upward to, a powered rail prefers, in order: west, east, south, and north). Other configurations can be created by placing and removing various rail.