Doing the computations by hand, find the determinant of the matrix \(A\).
\[ A = \begin{pmatrix} 2 & 1 & 1 & 0 \\ 1 & 2 & 1 & 2 \\ -1 & 1 & 0 & 0 \\ 1 & 2 & 0 & 1 \end{pmatrix} \]
A <- matrix(c(2, 1, 1, 0,
1, 2, 1, 2,
-1, 1, 0, 0,
1, 2, 0, 1), nrow = 4, byrow = TRUE)
determinant <- det(A)
print(determinant)
## [1] -6