Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
LinearProgramming
  • See Also
    • NMinimize
    • Minimize
    • FindMinimum
  • Related Guides
    • Matrices and Linear Algebra
    • Linear Systems
    • Graph Programming
  • Tech Notes
    • Numerical Optimization
    • Constrained Optimization
    • Unconstrained Optimization
    • Implementation notes: Numerical and Related Functions
    • See Also
      • NMinimize
      • Minimize
      • FindMinimum
    • Related Guides
      • Matrices and Linear Algebra
      • Linear Systems
      • Graph Programming
    • Tech Notes
      • Numerical Optimization
      • Constrained Optimization
      • Unconstrained Optimization
      • Implementation notes: Numerical and Related Functions

LinearProgramming[c,m,b]

finds a vector x that minimizes the quantity c.x subject to the constraints m.x≥b and x≥0.

LinearProgramming[c,m,{{b1,s1},{b2,s2},…}]

finds a vector x that minimizes c.x subject to x≥0 and linear constraints specified by the matrix m and the pairs {bi,si}. For each row mi of m, the corresponding constraint is mi.x≥bi if si==1, or mi.x==bi if si==0, or mi.x≤bi if si==-1.

LinearProgramming[c,m,b,l]

minimizes c.x subject to the constraints specified by m and b and x≥l.

LinearProgramming[c,m,b,{l1,l2,…}]

minimizes c.x subject to the constraints specified by m and b and xi≥li.

LinearProgramming[c,m,b,{{l1,u1},{l2,u2},…}]

minimizes c.x subject to the constraints specified by m and b and li≤xi≤ui.

LinearProgramming[c,m,b,lu,dom]

takes the elements of x to be in the domain dom, either Reals or Integers.

LinearProgramming[c,m,b,lu,{dom1,dom2,…}]

takes xi to be in the domain domi.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
Method  
Tolerance  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page
OBSOLETE SYMBOL
  • See Also
    • NMinimize
    • Minimize
    • FindMinimum
  • Related Guides
    • Matrices and Linear Algebra
    • Linear Systems
    • Graph Programming
  • Tech Notes
    • Numerical Optimization
    • Constrained Optimization
    • Unconstrained Optimization
    • Implementation notes: Numerical and Related Functions
    • See Also
      • NMinimize
      • Minimize
      • FindMinimum
    • Related Guides
      • Matrices and Linear Algebra
      • Linear Systems
      • Graph Programming
    • Tech Notes
      • Numerical Optimization
      • Constrained Optimization
      • Unconstrained Optimization
      • Implementation notes: Numerical and Related Functions

LinearProgramming

As of Version 13.0, LinearProgramming has been superseded by LinearOptimization.

LinearProgramming[c,m,b]

finds a vector x that minimizes the quantity c.x subject to the constraints m.x≥b and x≥0.

LinearProgramming[c,m,{{b1,s1},{b2,s2},…}]

finds a vector x that minimizes c.x subject to x≥0 and linear constraints specified by the matrix m and the pairs {bi,si}. For each row mi of m, the corresponding constraint is mi.x≥bi if si==1, or mi.x==bi if si==0, or mi.x≤bi if si==-1.

LinearProgramming[c,m,b,l]

minimizes c.x subject to the constraints specified by m and b and x≥l.

LinearProgramming[c,m,b,{l1,l2,…}]

minimizes c.x subject to the constraints specified by m and b and xi≥li.

LinearProgramming[c,m,b,{{l1,u1},{l2,u2},…}]

minimizes c.x subject to the constraints specified by m and b and li≤xi≤ui.

LinearProgramming[c,m,b,lu,dom]

takes the elements of x to be in the domain dom, either Reals or Integers.

LinearProgramming[c,m,b,lu,{dom1,dom2,…}]

takes xi to be in the domain domi.

Details and Options

  • All entries in the vectors c and b and the matrix m must be real numbers.
  • The bounds li and ui must be real numbers or Infinity or -Infinity.
  • None is equivalent to specifying no bounds.
  • LinearProgramming gives exact rational number or integer results if its input consists of exact rational numbers.
  • LinearProgramming returns unevaluated if no solution can be found.
  • LinearProgramming finds approximate numerical results if its input contains approximate numbers. The option Tolerance specifies the tolerance to be used for internal comparisons. The default is Tolerance->Automatic, which does exact comparisons for exact numbers, and uses tolerance for approximate numbers.
  • SparseArray objects can be used in LinearProgramming.
  • With Method->"InteriorPoint", LinearProgramming uses interior point methods.

Examples

open all close all

Basic Examples  (3)

Minimize , subject to constraint and implicit non-negative constraints:

LinearProgramming has been superseded by LinearOptimization:

Solve the problem with equality constraint and implicit non-negative constraints:

Use LinearOptimization to solve the problem:

Solve the problem with equality constraint and implicit non-negative constraints:

Use LinearOptimization to solve the problem:

Scope  (6)

Minimize , subject to constraint and lower bounds , :

Minimize , subject to constraint and bounds , :

Minimize , subject to constraint and upper bounds , :

Minimize , subject to constraint and implicit non-negative constraints:

Minimize subject to bounds and only:

Solve the same kind of problem, but with both variables integers:

Solve the same problem, but with the first variable an integer:

Solve larger LPs, in this case 200,000 variables and 10,000 constraints:

Options  (2)

Method  (1)

"InteriorPoint" is faster than "Simplex" or "RevisedSimplex", though it only works for machine-precision problems:

Tolerance  (1)

If an approximated solution is sufficient, a loose Tolerance option makes the solution process faster:

Properties & Relations  (2)

A linear programming problem can also be solved using Minimize:

NMinimize or FindMinimum can be used to solve inexact linear programming problems:

Possible Issues  (4)

The integer programming algorithm is limited to the machine-number problems:

The "InteriorPoint" method only works for machine numbers:

The "InteriorPoint" method may return a solution in the middle of the optimal solution set:

The "Simplex" method always returns a solution at a corner of the optimal solution set:

In this case the optimal solution set is the set of all points on the line segment between and :

The "InteriorPoint" method may not always be able to tell if a problem is infeasible or unbounded:

Neat Examples  (1)

This expresses the Klee–Minty problem of dimension n in LinearProgramming syntax:

Because scaling is applied internally, the simplex algorithm converges very quickly:

See Also

NMinimize  Minimize  FindMinimum

Function Repository: L1Solve  LInfinitySolve

Tech Notes

    ▪
  • Numerical Optimization
  • ▪
  • Constrained Optimization
  • ▪
  • Unconstrained Optimization
  • ▪
  • Implementation notes: Numerical and Related Functions

Related Guides

    ▪
  • Matrices and Linear Algebra
  • ▪
  • Linear Systems
  • ▪
  • Graph Programming

History

Introduced in 1991 (2.0) | Updated in 2003 (5.0) ▪ 2007 (6.0)

Wolfram Research (1991), LinearProgramming, Wolfram Language function, https://reference.wolfram.com/language/ref/LinearProgramming.html (updated 2007).

Text

Wolfram Research (1991), LinearProgramming, Wolfram Language function, https://reference.wolfram.com/language/ref/LinearProgramming.html (updated 2007).

CMS

Wolfram Language. 1991. "LinearProgramming." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/LinearProgramming.html.

APA

Wolfram Language. (1991). LinearProgramming. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LinearProgramming.html

BibTeX

@misc{reference.wolfram_2025_linearprogramming, author="Wolfram Research", title="{LinearProgramming}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/LinearProgramming.html}", note=[Accessed: 04-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_linearprogramming, organization={Wolfram Research}, title={LinearProgramming}, year={2007}, url={https://reference.wolfram.com/language/ref/LinearProgramming.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English