Define matrix A:

Define matrix B:

Ad