Supposing that the matrix `X` is `X = ((a,b),(c,d))` , you need to evaluate `X^2` , such that:

`X^2 = ((a,b),(c,d))*((a,b),(c,d))`

`X^2 = ((a^2+bc,ab+bd),(ac+cd,bc+d^2))`

`((a^2+bc,ab+bd),(ac+cd,bc+d^2)) = ((1,2),(0,-1))`

Equating the corresponding elements both sides yields:

`{(a^2 + bc = 1),(ab + bd = 2),(ac + cd = 0),(bc + d^2 = -1):}`

Considering equations 2 and 3 yields:

`{(b(a + d) = 2),(c(a + d) = 0):}`

Using the zero product rule in equation `c(a + d) = 0` yields that only `c = 0` since if `a + d = 0` , then `b*(a+d) != 2` .

Since `c = 0` , yields `d^2 = -1 => d = +-sqrt(-1) => d = +-i`

Since the problem does not specify the nature of elements of matrix `X` , you may accept complex solutions.

Since `c = 0` , yields `a^2 = 1 => a = +-1`

Replacing `a = 1 ` and `d = i ` in equation `b(a + d) = 2` yields:

`b(1 + i) = 2 => b = 2/(1 + i) => b = (2(1 - i))/((1 + i)(1 - i))`

`b = (2 - 2i)/(1 - i^2) => b = (2 - 2i)/2 => b = 1 - i`

Replacing `a = 1` and `d = -i ` in equation `b(a + d) = 2` yields:

`b(1 - i) = 2 => b = 2/(1 - i) => b = (2(1 + i))/((1 + i)(1 - i))`

`b = (2 + 2i)/(1 - i^2) => b = (2 + 2i)/2 => b = 1 + i`

Replacing `a = -1` and `d = i` in equation `b(a + d) = 2` yields:

`b(-1 + i) = 2 => b = 2/(-1 + i) => b = (2(-1 - i))/((-1 + i)(-1 - i))`

`b = (-2 - 2i)/(1 - i^2) => b = (-2 - 2i)/2 => b = -1 - i`

Replacing `a = -1` and `d = -i` in equation `b(a + d) = 2` yields:

`b(-1 - i) = 2 => b = 2/(-1 - i) => b = (2(-1 + i))/((-1 + i)(-1 - i))`

`b = (-2 + 2i)/(1 - i^2) => b = (-2 + 2i)/2 => b = -1 + i`

**Hence, evaluating the solution to matrix equation yields `X = ((+1,+-1+-i),(0,+-i))` .**