(*Exercise 3*)

n=1;m=2;
X=Array[x,n];
A={{-1},{1}};
b={2,3};
And@@Table[A[[i]].X≤b[[i]],{i,1,m}]

n=1;m=2;
X=Array[x,n];
A={{-1},{1}};
b={-3,2};
And@@Table[A[[i]].X≤b[[i]],{i,1,m}]

n=2;m=3;
X=Array[x,n];
A={{1,-2},{0,1},{3,2}};
b={2,1,-3};
And@@Table[A[[i]].X≤b[[i]],{i,1,m}]
RegionPlot[And@@Table[A[[i]].X≤b[[i]],{i,1,m}],{x[1],-5,5},{x[2],-5,5}]

n=3;m=6;
X=Array[x,n];
A={{-1,0,0},{0,-1,0},{0,0,-1},{1,0,0},{0,1,0},{0,0,1}};
b={0,0,0,1,1,1};
And@@Table[A[[i]].X≤b[[i]],{i,1,m}]
RegionPlot3D[And@@Table[A[[i]].X≤b[[i]],{i,1,m}],{x[1],-2,2},{x[2],-2,2},{x[3],-2,2},PlotPoints->100]