def find_matrix(document):
    """
    Find  **matrix** in document.

    The spline syntax allows following definitions:
        - **'matrix'** - ordered execution of each pipeline (short form)
        - **'matrix(ordered)'** - ordered execution of each pipeline (more readable form)
        - **'matrix(parallel)'** - parallel execution of each pipeline

    Args:
        document (dict): validated spline document loaded from a yaml file.

    Returns:
        list: matrix as a part of the spline document or an empty list if not given.

    >>> find_matrix({})
    []
    >>> find_matrix({'matrix': [1]})
    [1]
    >>> find_matrix({'matrix(ordered)': [2]})
    [2]
    >>> find_matrix({'matrix(parallel)': [3]})
    [3]
    """
    return document['matrix'] if 'matrix' in document \
        else document['matrix(ordered)'] if 'matrix(ordered)' in document \
        else document['matrix(parallel)'] if 'matrix(parallel)' in document \
        else []