In math, what is a chessboard + pieces? What mathematical concept would a chessboard + pieces be? Is there any matrix where the squares are kinda related, in the same way that for example a rock relates to all the column/row, where it is.

Ignoring other pieces, each of the chess pieces have a fixed set of legal moves from a given square (with some exceptions: pawns can capture en passant and promote, and there is also castling).  These can be represented as graphs (in the sense of graph theory).
For example, the following image ("borrowed" from Wikipedia) represents the legal moves by a knight:

A knight's tour of the chessboard is equivalent to a Hamilton path of the above graph.
This could be represented as a $(0,1)$-matrix by taking its adjacency matrix.
