IMC 2002 · Problem 1

Day 29th IMC · Warsaw, Poland

Statement

Compute the determinant of the n×nn \times n matrix A=[aij]A = [a_{ij}],

aij={(1)ij,if ij,2,if i=j.a_{ij} = \begin{cases} (-1)^{|i-j|}, & \text{if } i \ne j, \\ 2, & \text{if } i = j. \end{cases}

Official solution

Hidden so you can work on the problem first.