with X as (select * from values (1, 1, 2), (1, 2, 4), (2, 1, 1), (2, 2, 5) as _(i,j,value)) from matrix_elementwise_power('X', 2);