# A question about the Matrix plugin

**URL:** <https://community.jenkins.io/t/a-question-about-the-matrix-plugin/8113>\
**Category:** Using Jenkins\
**Created:** [June 21, 2023, 11:49am UTC](https://community.jenkins.io/t/a-question-about-the-matrix-plugin/8113 "2023-06-21T11:49:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidA2014](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/davida2014/32/88_2.png) [@DavidA2014](https://community.jenkins.io/u/DavidA2014)\
**Post date:** [June 21, 2023, 11:49am UTC](https://community.jenkins.io/t/a-question-about-the-matrix-plugin/8113/1 "2023-06-21T11:49:42Z")

</div>

Hi, I want to migrate our freestyle Matrix jobs to declarative pipeline. But first I need to understand how the freestyle job works.

The matrix jobs use an Agents block named ‘label’ and one User-defined axis named ‘Simulation’.

Provided the agents are specified by a Label (not individual nodes), the build steps execute one of the simulation files specified by axis **Simulation** on **one** of the agents specified by **label**. I.e. this is not a multiplication where all simulations run on all agents.

Please can anyone tell me where this specific behavior is defined?

How would I reproduce it in declarative pipeline?
