You've heard of binary star systems, right? It's where there are two stars close to each other, and they both orbit around a common center of mass. Sure, you saw binary stars in the original movie, where Luke Skywalker was on the desert planet Tatooine. Oh wait, that's Star *Wars* and this is Star *Trek*. I'm kidding, I know the difference. But binary stars are real.

So … what about an *octonary* system, one with *eight* stars, all gravitationally interacting with each other? That's what we get in *Star Trek: Picard*. In this case it’s actually an artificially created system set up by an alien race long ago as a warning sign for future civilizations—uh, long story. We'll know more after watching the season finale, which comes out today.

But you’re thinking the same thing I am: Could an eight-star system exist in the real universe? And if it did, how could the stars be arranged so the system was stable? How would it all move? As Enoch, the navigation hologram, says in the show, “The gravitational mechanics would have to be … incredibly complex.” In other words, we should try to model this thing!

Three’s a Crowd

I should mention that there’s a little physics backstory here—a famous situation called the three-body problem. See, if you have *two* objects that are gravitationally interacting with each other, like, say, the Earth and the sun, that’s a solvable problem. With a bit of math you can turn it into an equivalent one-dimensional, one object problem. It's complicated, but also seemingly magical. You can get an equation that determines the future position and velocity of both objects *for all time*.

But it turns out that with three (or more) bodies, there’s no way to derive an equation of motion. To model such a system you have to use a numerical calculation. That’s where you break the trajectories into small time intervals. At each step, you calculate where each object will be at the end of the interval, based on the forces at work, and you just keep doing that till you map out the whole system.

So with three objects, we’d have to calculate the *net* gravitational force on each object. Remember that the gravitational force is an attractive interaction between two objects with mass. Its magnitude depends on the product of the two masses (let's call them m_{A} and m_{B}), and is inversely proportional to the square of the distance (r) between their centers:

So with three objects, there are multiple gravitational forces to calculate. This diagram shows an example of a three-body system, with two stars labeled A and B and a planet labeled P. You can see how each object has two different gravitational forces acting on it. The dotted lines are the momentum vectors.

Here’s the basic recipe to model the motion of a multistar system at each time step:

- Get the position of each object and the distances between them (i.e., find all the r's).
- Use the distances to find the gravitational forces for all object pairs. In a three-body system there are three unique pairs.
- Determine the net force on each planet.
- Use this to find the momentum (mass × velocity) of each object at the end of the interval. Assume the net force is constant (which technically isn't true, but close enough for these short intervals).
- Use the momentum to update the position of each object.
- Repeat these steps until you get the trajectory you want or your computer explodes.

Eight Is More Than Enough

Now, what would happen if I put *eight* stars together in an arrangement like the one we see in *Star Trek: Picard*? Something like this (not to scale):

Of course, just putting eight stars together doesn't mean it will be a stable system. Sure, they'll interact, but they might slam into each other, or some stars might get ejected from the group. It won't last for billions of years. And what good is a monument that doesn't last?

So, how do we put these stars into some type of stable orbit? Well, binary star systems are stable, so let's start there. Imagine I have two stars interacting with each other. There are all kinds of orbital paths that might be stable, but let's use a simple one we know will be stable, where both stars move in a circular path. Here's what that would look like:

Both of the stars are orbiting around a common center of mass. If the stars have equal masses, then that center of mass is the actual center of the circular orbit. Each star has a gravitational force pulling on it from the other star. This force pulls the star to make it accelerate. Yes, moving in a circle, even at constant speed, is an acceleration, since the vector direction constantly changes.

The magnitude of this acceleration (called the centripetal acceleration) depends on the magnitude of the velocity and the radius of the circle:

Now I can set the gravitational force equal to the product of mass and acceleration to get an expression for the velocity. Notice something important: If the stars are moving in a circle of radius r, the distance between them will be 2r. That means the distance for the gravitational force will not be the same distance as for the centripetal acceleration. Oh, also, since there are two equal masses on the left and one on the right, they partially cancel.

And solving for v:

This means that if I know the mass of the two stars and the distance between them, I can find the velocity that will produce circular orbits. We can plug that into our model.

The Model

OK, let's do this. Here are two stars with a mass of 10^{30} kilograms (equal to the mass of our sun) and a distance of 18 AU apart (1 AU is the distance from Earth to the sun). This is actual, live Python code. Press Play to run the visualization; press the pencil icon to see and edit the code.

So far so good. It's a nice circular orbit. But we aren't there yet. Now let’s bump this up to four stars. How about if this binary star system is orbiting *another* binary star system? That's what it looks like in the diagram shown in episode 9 of the TV show. Maybe you see where this is going. Basically, we’re creating nested levels of binary systems.

Would that work? Well, if the two sets of binary stars are far enough apart, then they would each produce a gravitational force that is approximately like a single star with twice the mass. That means I could use the same velocity calculator but with a different radius and a different mass.

Of course that velocity calculation is just for the center of mass of the binary systems. I would still need to determine the velocities of the individual stars. Yes, it's getting complicated, but maybe this diagram will help:

So each star has its own unique starting velocity based on its position in the system. Now let’s add another layer to create the full eight-star system. Are you ready for this? To make it work, the binary stars need to be much closer together than the distance between the two pairs of binary systems. The whole thing is going to be HUGE.

This also means that the small binary pairs will be orbiting much faster than the system as a whole. That poses an issue for the numerical calculation. It means I can either have an appropriately short time interval for the individual stars, in which case it will take a long to time run—or I can have a longer interval and faster calculation, but it won't be as accurate.

I decided to go with a more accurate slow model. I won't make you watch this whole thing play out—it took three hours to run on my computer—but here is the code if you want to play with it. And here is what I eventually got. Check out this crazy map of the trajectory of the eight stars!

Seriously, that's insane! Each half is like two cosmic Slinkys coiling around each other. And the scale is enormous—I got a diameter for the overall system of about 1,500 AU, which is roughly 19 times farther across than our solar system.

Now, I should explain, you're seeing only the outer two layers of the system here. If you zoomed in, you'd see that each of those coiling lines is traced out by the smallest binary systems, with the individual stars spinning around each other. But because of the size of this thing, it's impossible to see both the lowest level and the highest level at the same time.

A few comments:

- If the system is truly stable, the whole thing should repeat. It's close, but it looks like it wouldn't quite get back to the same starting position.
- I'm pretty sure this would work better if the distance between the binary systems was even greater, but then you really wouldn't be able to see the details.
- It's art. Don't you think? I like it.

So, is this eight-star system possible? Oh, for sure. Is it stable? I can't tell for certain, but it might be. Now for some homework questions. You know I can't resist:

- Using my numerical model, check and see if energy is conserved during the orbital motion.
- What about angular momentum? Is that conserved? Hint: It should be.
- Assume you're an ancient alien civilization and you want to build this octonary system by moving some stars around. How much energy would this require? Yes, the stars could gain kinetic energy as you move them closer together, but they are also going to need kinetic energy to be in the proper orbit. You can also estimate the energy required to remove a star from a solar system. (Use our solar system for your approximations.)
- Finally, what if you put a planet in the middle of this star system. Would it stay there?