While those design matrices should “work”, they’re not ideal; they’re what’s referred to as rank-deficient. In both cases, you can see that the first column can be constructed as a linear combination of the second and third columns. It is therefore impossible for the linear regression to estimate unique beta coefficients for these columns.
Having said that, the MRtrix3 GLM code is written in such a way as to be compatible with rank-deficient design matrices; and the fact that your contrast vector does not use the beta coefficients for those redundant columns means that the non-uniqueness of the regression shouldn’t actually influence the resulting t-statistic.
Using @phmag’s example, more “standard” ways of expressing the design would be either:
1 0 3
0 1 8
0 1 13
1 0 4
(each of the two first columns models the group mean of one of the two groups)
, or:
1 1 3
1 -1 8
1 -1 13
1 1 4
(the first column estimates the “global intercept” of the regression, while the second directly encodes the difference between the two groups).