ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 01 Jan 2022 10:44:48 +0100Create polyhedron for given matrix A and vector bhttps://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/> P(A,b)={x∣ A.x ≤ b}
I have to create a polyhedron with this inputs
but in sage inequalities like this
> A.x + b >= 0
, how to convertThu, 30 Dec 2021 19:58:55 +0100https://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/Comment by slelievre for <blockquote>
<p>P(A,b)={x∣ A.x ≤ b}</p>
</blockquote>
<p>I have to create a polyhedron with this inputs</p>
<p>but in sage inequalities like this </p>
<blockquote>
<p>A.x + b >= 0</p>
</blockquote>
<p>, how to convert</p>
https://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/?comment=60497#post-id-60497Welcome to Ask Sage! Thank you for your question.Sat, 01 Jan 2022 06:52:09 +0100https://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/?comment=60497#post-id-60497Answer by rburing for <blockquote>
<p>P(A,b)={x∣ A.x ≤ b}</p>
</blockquote>
<p>I have to create a polyhedron with this inputs</p>
<p>but in sage inequalities like this </p>
<blockquote>
<p>A.x + b >= 0</p>
</blockquote>
<p>, how to convert</p>
https://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/?answer=60500#post-id-60500$Ax \leq b \iff Ax - b \leq 0 \iff (-A)x + b \geq 0.$
So if you have $(A, b)$ such that $Ax \leq b$ is your polyhedron, then the pair $(A', b)$, where $A'=-A$, is such that $A'x + b \geq 0$ is also your polyhedron.Sat, 01 Jan 2022 10:44:48 +0100https://ask.sagemath.org/question/60478/create-polyhedron-for-given-matrix-a-and-vector-b/?answer=60500#post-id-60500