Hf02 based ferroelectric FET (FeFET) has recently received great interest for its application in nonvolatile memory (NVM) . Unlike conventional perovskite based ferroelectric materials, Hf02 is CMOS compatible and retains ferroelectricity for thin film with thickness around 10 nm. Therefore, successful integration of ferroelectric Hf02 into advanced CMOS technology makes this technology highly promising for NVM . Moreover, by tuning the portion of switched ferroelectric domain, a FeFET can exhibit multiple intermediate states, which enables its application as an analog conductance in mixed-signal in-memory computing. Currently, such architectures have been applied to neuromorphic computing , . In this paper, we present a processing-in-memory (PIM) architecture with FeFETs and demonstrate how this can be used to solve a new class of optimization problems, in particular, distributed least square minimization.