According to FAA regulations, how far should a commercial jet be away from another plane in-flight?
How about military planes? They get really close when in formations... Is there a minimum distance?
The question specifically asks about FAA regulations, so I will try to provide specific citations.
For a commercial airliner (as the question asked), separation will usually be at least 3 miles laterally, or 1,000 feet vertically. In the enroute environment -- at higher operating speeds above 10,000 feet and based on the type of Radar and distance from the antennae -- a 5 mile rule is applied laterally. This is true in most but not all situations. There are exceptions: see below.
Note also the "or": it is allowed (and in fact rather common) for two jets to cross paths at the same moment, with one 1,000 feet directly above the other. The 3 miles is only required if the jets do not have at least 1,000 feet of vertical separation.
The regulations do not set a specific distance that pilots flying under VFR must maintain from each other. There's just the following blanket statement:
§91.111, Operating near other aircraft: (a) No person may operate an aircraft so close to another aircraft as to create a collision hazard. (b) No person may operate an aircraft in formation flight except by arrangement with the pilot in command of each aircraft in the formation.
In addition, there is the catch-all "careless or reckless operation" clause:
§91.13, Careless or reckless operation: No person may operate an aircraft in a careless or reckless manner so as to endanger the life or property of another.
Pilots flying under IFR are subject to the same kinds of rules, and are still responsible for maintaining separation from other traffic when in visual conditions. The rules are the same: the pilot is given the discretion of deciding what a "safe distance" is.
Actual distance limits only come into play for the air traffic controllers, who are responsible for providing minimum separation distances between IFR traffic.
Air Traffic Controllers
The set of FAA regulations for air traffic controllers is FAA order 7110.65. These regulations are quite complicated and there are lots of exceptions and corner cases for various scenario. I'll try to give only the most basic rules here, but note that a full reading of 7110.65 would be necessary to understand all the minutiae.
Things get more complicated in the following scenarios, and exceptions apply to them:
For these scenarios the regulations are rather lengthy and complicated, so I would simply refer you to Order 7110.65 in general.
When flying in airspace controlled by ATC, military pilots must follow the same rules as civilian aircraft. ATC will keep them separated according to the rules above. However, there are two main exceptions to this.
When flying in formation, such as for training, aerial refueling, or intercepting aircraft, they are much too close for ATC to provide safety. In these cases, ATC will allow the pilots to fly under MARSA (Military Assumes Responsibility for Separation of Aircraft). In the case of interception, if the fighter pilot is not able to see the aircraft they are intercepting before the minimum separation, they must break off. They can only fly under MARSA if they can actually ensure visual separation.
The FAA can also define an MOA (Military Operations Area). Once military aircraft enter this area, ATC is no longer responsible for them and they are under MARSA. When the aircraft leave the MOA, ATC resumes control. They can still be under MARSA for a formation, but ATC will keep that formation separated from other traffic.
In tactical formation flying, there is no limit. The Blue Angels routinely fly with only 18" separation between the wing tip and the cockpit canopy. Combat aircraft fly a variety of different formation patterns at varying distances, and pilots are extensively trained on each pattern and what the appropriate/safe distances are. (For example, a fingertip formation allows for much closer flying than a line-abreast formation.)
With formation flights it is as close as the pilots feel comfortable with in the circumstances. On clear days and in level flight brushing wingtips is allowed as long as you don't endanger the other planes.
For normal (commercial) flights vertical separation of 1000 feet is maintained when passing each other.
for planes incoming for landing there is 4-8 NM radar separation depending on the size and weight of the planes.
you have 3 separations for commercial flights