Question(s):

"Is there a theoretical limit to how big can a star get, or would it collapse from gravity before? If no, then in theory could we get a star as big as a mini-galaxy?" Asked By: Théo De Freitas Neto

The main determining factor in all of this is the mass of the star. The mass of the star eventually determines the potential size of a star. So I'll start off by mentioning how the mass effects the star, and then explain why you’re not going to get a radius the size of a mini-galaxy.

First, at the beginning  of star formation, you have a molecular cloud that may be 200 thousand solar masses, such as the Orion Molecular Cloud, for example. We can use Jeans Mass and Jeans Length (I’ll explain it a bit later on), to work out the size that a part of a cloud needs to be in order to start to collapse and start star formation. This is dependent on the mass, density, and the temperature of the molecular cloud. When it starts collapsing, you're going to end up with parts of the cloud that are denser than other parts, so you get what is called "Fragmentation."

JEAN'S MASS:

Basically, the original Jeans Mass determines the size the initial cloud needs to be in order to collapse. As it's collapsing, the Jeans Mass decreases more and more due to pockets of greater density. Thus, instead of a 500 solar mass star from a 500 solar mass cloud, you're more likely to end up with 100 smaller stars.

Let's say, for example, that one of the stars that forms is 80 solar masses. That's 80 times the mass of  our sun, so it's pretty huge. It is going to end its life with a supernova, leaving behind a black hole. Of all the main sequence burning cycles in stars, the cycle where hydrogen is burning requires the lowest temperature, it only needs about 4 million degrees. Compare this to the 15 million needed for the CNO cycle (which is still the burning of hydrogen but using Carbon Nitrogen and Oxygen as catalysts). Moreover, helium burning kicks off at about 100 million degrees, carbon burning at 600 million degrees, oxygen burning at about a billion degrees, and silicon burning at 3 billion degrees.

So as you can see, a 80 solar mass star is going to need to be AT LEAST 3 billion degrees in temperature at its core before it can even start burning Silicon to form Iron. Really then, the hotter that the core is, the more energy that is being released--And that energy has to go somewhere.

Ultimately, virtually all stars are in a state of hydrostatic equilibrium (variable stars are the exception). This means that the outwards radioactive pressure and the inwards force of gravity are at equilibrium.