def inverse2d(a):
    """
    Returns the matrix inverse of 2x2 matrix "a".

    :param a: The original 2x2 matrix.
    :return: Its matrix inverse. 

    """
    result = [[0, 0], [0, 0]]
    det_a = (a[1][1] * a[0][0]) - (a[0][1] * a[1][0])
    for a_row in range(len(result)):
        for a_col in range(len(result[a_row])):
           result[a_row][a_col] = round(a[a_row][a_col] * (1/det_a), 6)
    buffer = result[1][1]
    result[0][1] *= -1
    result[1][0] *= -1
    result[1][1] = result[0][0]
    result[0][0] = buffer
    return result