# Duality for the SVM

DevFeed: [Duality for the SVM](<https://devfeed.tech/articles/duality-for-the-svm-40412.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/06/12/duality-for-the-svm/>)

Published: 2017-06-12T08:00:50Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [lagrange-multipliers](<https://devfeed.tech/tags/lagrange-multipliers.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [simplex-algorithm](<https://devfeed.tech/tags/simplex-algorithm.md>)

## AI overview

This tutorial explains how the Karush-Kuhn-Tucker theorem applies to the support vector machine optimization problem. It introduces the structure of convex quadratic optimization and states the conditions involving gradients, primal and dual constraints, and complementary slackness.

## Source excerpt

This post is a sequel to Formulating the Support Vector Machine Optimization Problem. The Karush-Kuhn-Tucker theorem Generic optimization problems are hard to solve efficiently. However, optimization problems whose objective and constraints have special structure often succumb to analytic simplifications. For example, if you want to optimize a linear function subject to linear equality constraints, one can compute the Lagrangian of the system and find the zeros of its gradient. More generally, optimizing a linear function subject to linear equality and inequality constraints can be solved using various so-called "linear programming" techniques, such as the simplex algorithm.