# hessian: 2x2 Hessian Matrix (Single-Choice)

Exercise template for computing the Hessian for a given function with randomly-drawn parameters.

**Name:**

`hessian`

**Type:**

**Description:**

Computing one randomly-selected element from the Hessian for a given quadratic function with two arguments. The coefficients of the function are drawn randomly and the correct answer has to be selected from five choice items. The latter are generated through

`num_to_schoice()`

by providing the other three elements of the Hessian as typical errors. Further random answers are taken from a prespecified range, assuring only integer solutions. Although the Hessian of a quadratic function has only constant elements, an argument vector is given in the exercise because other types of functions might have non-constant Hessians.**Solution feedback:**

Yes

**Randomization:**

Random numbers and text blocks

**Mathematical notation:**

Yes

**Verbatim R input/output:**

No

**Images:**

No

**Other supplements:**

No

*(Note that the HTML output contains mathematical equations in MathML. It is displayed by browsers with MathML support like Firefox or Safari - but not Chrome.)*

**Demo code:**

```
library("exams")
set.seed(1090)
exams2html("hessian.Rnw")
set.seed(1090)
exams2pdf("hessian.Rnw")
set.seed(1090)
exams2html("hessian.Rmd")
set.seed(1090)
exams2pdf("hessian.Rmd")
```