Solve Linear Equations in LibreOffice Calc Solver

The LibreOffice Calc Solver is a powerful optimization tool designed to solve complex mathematical models, including systems of simultaneous linear equations and linear programming problems. By defining target variables, adjustable parameter cells, and mathematical constraints, Calc can compute exact solutions using specialized linear optimization algorithms. This guide outlines the specific methods and engines available in LibreOffice Calc to solve linear equations efficiently.

Core Solving Engines for Linear Equations

LibreOffice Calc includes multiple solver engines accessible via the Options menu within the Solver dialog (Tools > Solver > Options). For linear equations, two primary algorithms are used:

Both engines rely on the Simplex Method, a widely used mathematical algorithm that navigates the vertices of a feasible multidimensional region to find the optimal solution satisfying all linear equality and inequality constraints.


Method for Setting Up and Solving Linear Equations

Solving linear systems in LibreOffice Calc requires structuring the spreadsheet into coefficients, variables, formulas, and constraints.

1. Structure the Spreadsheet

2. Configure the Solver Parameters

  1. Navigate to Tools > Solver.
  2. Target Cell: Select the cell containing your objective function. If you are solving a standard system of simultaneous equations without optimization, set this cell to minimize or maximize any dependent linear formula, or set a target value.
  3. By Changing Cells: Select the range of cells designated for your unknown variables.
  4. Limiting Conditions (Constraints):
    • Add each equation as a constraint.
    • Select the Cell Reference (the formula cell representing the left-hand side).
    • Choose the operator (= for exact linear equations, or <=/>= for linear inequalities).
    • Set the Value to the corresponding right-hand side constant cell.

3. Select the Linear Engine and Solve

  1. Click Options inside the Solver dialog.
  2. Under the Solver engine dropdown, select CoinMP Linear Solver or LibreOffice Linear Solver.
  3. Ensure the setting Assume variables as non-negative is unchecked if your variables can take negative values.
  4. Click OK, then click Solve.
  5. Once the optimal solution is found, choose Keep Result to write the calculated values directly into your variable cells.