import math


def linear_to_matrix_pairs(linear_indexes):
    """
    Transform a linear vector into a matrix representation
    """
    Nlinear = linear_indexes.size
    Nside = int(math.sqrt(Nlinear))

    rows_indexes = []
    columns_indexes = []
    
    for index in linear_indexes:
        rows_indexes.append(index // Nside)
        columns_indexes.append(index % Nside)

    return zip(rows_indexes, columns_indexes)