text: The precursors of ketone bodies include fatty acids from adipose tissue or the diet and ketogenic amino acids. The formation of ketone bodies occurs via ketogenesis in the mitochondrial matrix of liver cells.
  Fatty acids can be released from adipose tissue by adipokine signaling of high glucagon and epinephrine levels and low insulin levels. High glucagon and low insulin correspond to times of low glucose availability such as fasting. Fatty acids bound to coenzyme A allow penetration into mitochondria. Once inside the mitochondrion, the bound fatty acids are used as fuel in cells predominantly through beta oxidation, which cleaves two carbons from the acyl-CoA molecule in every cycle to form acetyl-CoA. Acetyl-CoA enters the citric acid cycle, where it undergoes an aldol condensation with oxaloacetate to form citric acid; citric acid then enters the tricarboxylic acid cycle (TCA), which harvests a very high energy yield per carbon in the original fatty acid.
  Acetyl-CoA can be metabolized through the TCA cycle in any cell, but it can also undergo ketogenesis in the mitochondria of liver cells. When glucose availability is low, oxaloacetate is diverted away from the TCA cycle and is instead used to produce glucose via gluconeogenesis. This utilization of oxaloacetate in gluconeogenesis can make it unavailable to condense with acetyl-CoA, preventing entrance into the TCA cycle. In this scenario, energy can be harvested from acetyl-CoA through ketone production.
  In ketogenesis, two acetyl-CoA molecules condense to form acetoacetyl-CoA via thiolase. Acetoacetyl-CoA briefly combines with another acetyl-CoA via HMG-CoA synthase to form hydroxy-β-methylglutaryl-CoA. Hydroxy-β-methylglutaryl-CoA form the ketone body acetoacetate via HMG-CoA lyase. Acetoacetate can then reversibly convert to another ketone body—D-β-hydroxybutyrate—via D-β-hydroxybutyrate dehydrogenase. Alternatively, acetoacetate can spontaneously degrade to a third ketone body (acetone) and carbon dioxide, which generates much greater concentrations of acetoacetate and D-β-hydroxybutyrate. The resulting ketone bodies cannot be used for energy by the liver so are exported from the liver to supply energy to the brain and peripheral tissues.
  In addition to fatty acids, deaminated ketogenic amino acids can also be converted into intermediates in the citric acid cycle and produce ketone bodies.