import torch


def is_single_matrix_pd(mat):
    """Check if 2D square matrix is positive definite."""
    if mat.shape[0] != mat.shape[1]:
        return False
    try:
        torch.linalg.cholesky(mat)
        return True
    except RuntimeError:
        return False