With the answer type mc.matrix you can arrange your multiple choice problem in a matrix layout.

Rows and columns can be permuted. That's optional, as are the title name for rows and the title name for columns.
• \permuterows{min index}{max index}
• \permutecolumns{min index}{max index}
• \rowTitle{row title}
• \columnTitle{column title}
The column labels are defined by the \tasks command. The labels are seperated by a simicolon. As usual
you can write TeX, math, use variables and image references as a label.
• \tasks{column 1 label; column 2 label; ...}, e.g. \tasks{$e^x$; some text; function $\var{f}$;\image{image lid}}
Each row is defined in its own environment.
• \begin{row} ... \end{row}
The row labels are defined by the \text command inside a row environment. As usual you can write TeX, math, use
variables and image references as a label.
• \text{row label}

As in other multiple choice problems, a choice is defined by a choice environment.
See Part 2: create multiple choice problems for details.

## Example code¶

(for result see screenshot above)

\begin{question}

\begin{variables}
\randint{a}{2}{7}
\end{variables}

\type{mc.matrix}

\text{We are curious:}

\text{What do you think of the following functions?}

\permuterows{1}{2} %optional
\permutecolumns{1}{3} %optional
\rowTitle{Properties} %optional
\columnTitle{Functions} %optional

% column 1-4 labels
\tasks{$sin(\var{a}x)$;$e^x$;$42$; \image[100][100]{image1}}

\begin{row}

% row 1 label
\text{beautiful}

\begin{choice}
\solution{compute}
\iscorrect{a}{<}{4}
\end{choice}

\begin{choice}
\solution{true}
\end{choice}

\begin{choice}
\solution{false}
\end{choice}

\begin{choice}
\solution{false}
\end{choice}

\end{row}

\begin{row}

% row 2 label
\text{useful}

\begin{choice}
\solution{true}
\end{choice}

\begin{choice}
\solution{true}
\end{choice}

\begin{choice}
\solution{true}
\end{choice}

\begin{choice}
\solution{true}
\end{choice}

\end{row}