We develop a novel unfitted boundary algebraic equation (BAE) method for solving elliptic partial differential equations in complex geometries. The BAE method leverages lattice Green's functions on infinite meshes and discrete potential theory to construct single and double layer potentials along with their corresponding boundary algebraic equations. Local Lagrange basis functions following finite element methodology are constructed on cut cells near the boundary to accommodate various boundary condition types. The difference potentials framework is employed to handle non-homogeneous terms effectively. The BAE method offers several notable advantages: dimensional reduction, geometric flexibility, well-conditioned double layer formulations and Schur complement systems, elimination of small-cut issues, and compatibility with fast solvers. Numerical experiments demonstrate the method's capability to handle challenging geometries including multi-connected domains, sharp corners, and unbounded regions with uniform treatment - requiring no special numerical treatment. These results confirm both the accuracy and robustness of the developed approach.