I am trying to write down the dual of a linear minimisation problem and I would like your help to double check whether I'm doing it right. I'm following the instruction here .
The original minimisation problem is $$ \min_{z_1\in \mathbb{R}^{d_1}, z_2\in \mathbb{R}^{d_2}_{\geq 0}} \text{ }(b,0,0_{d_2})^T z $$ $$ \text{ s.t. } \\ A_{eq}z=a\\ A_{ineq}z\leq 0_{d_q}\\ $$ where
$z_1$ is a $d_1\times 1$ vector,
$z_2$ is a $d_2\times 1$ vector,
$b$ is a $(d_1-1)\times 1$ vector,
$0_{d_2}$ is a $d_2\times 1$ vector of zeros,
$z\equiv (z_1, z_2)$,
$A_{eq}$ is an $r\times (d_1+d_2)$ matrix,
$a$ is an $d_r\times 1$ vector,
$A_{ineq}$ is a $d_q\times (d_1+d_2)$ matrix.
I think that the dual is $$ \max_{\lambda_{eq}\in \mathbb{R}^{d_r}, \lambda_{ineq}\in \mathbb{R}^{d_q}_{\geq 0}} (a, 0_{d_q})^T (\lambda_{eq}, \lambda_{ineq}) $$ $$ \text{s.t.}\\ [A^T]_{1:d_1} (\lambda_{eq}, \lambda_{ineq})=(b,0)\\ -[A^T]_{d_1+1:end}(\lambda_{eq}, \lambda_{ineq}) \leq 0_{d_2} $$ where $A\equiv \begin{pmatrix} A_{eq}\\ A_{ineq} \end{pmatrix}$ and $[A^T]_{i:j}$ is the submatrix of $A^T$ obtaining by selecting the rows $i,i+1,...,j$ of $A^T$.
Question: Is the dual correct? I'm asking this because in my setting strong duality applies. Therefore, the two problems should have the same optimal value of the objective function. However, for example when $b=0$, I get that the optimal of the primal is $0$, while the dual is infeasible or unbounded. Before spending time on checking again my code, I want to make sure that I have written correctly the dual.