# \[AMPL 25040\] Matrix of variables

**URL:** <https://discuss.ampl.com/t/ampl-25040-matrix-of-variables/1085>\
**Category:** Google Group Mirror\
**Created:** [May 3, 2024, 1:50pm UTC](https://discuss.ampl.com/t/ampl-25040-matrix-of-variables/1085 "2024-05-03T13:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ae.naderi](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@ae.naderi](https://discuss.ampl.com/u/ae.naderi)\
**Post date:** [May 3, 2024, 1:50pm UTC](https://discuss.ampl.com/t/ampl-25040-matrix-of-variables/1085/1 "2024-05-03T13:50:50Z")

</div>

Hello everyone,  
I have 4 variables like this:  
var p0;  
var b;  
var x;  
var y;

And I want to create a matrix of these variables with dimensions (4\*1) like so:  
var X = [p0, b, x, y]  
Could anyone please provide me with the syntax for this matrix? Furthermore, I would like to express the following constraint:  
A \* X \< B .  
Where A and B are matrixes of values that I have defined previously. Thank you.  
Atena.

---

<div class="post-metadata">

**Author:** ![AMPL\_Google\_Group1](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AMPL\_Google\_Group1](https://discuss.ampl.com/u/AMPL_Google_Group1)\
**Post date:** [May 4, 2024, 12:19pm UTC](https://discuss.ampl.com/t/ampl-25040-matrix-of-variables/1085/2 "2024-05-04T12:19:22Z")

</div>

Your question has been moved to our new user forum at [discuss.ampl.com](http://discuss.ampl.com), and a response has been posted there. To see the response, use this link:

[https://discuss.ampl.com/t/matrix-of-variables/1084/2](https://discuss.ampl.com/t/matrix-of-variables/1084/2)

To reply, click the red “Reply” button that follows the response. (Do not send an email reply to this message.)
