Let S=K[x1,…,xn] be a polynomial ring over a field K, and E=⋀〈y1,…,yn〉 an exterior algebra. The linearity defect ldE(N) of a finitely generated graded E-module N measures how far N departs from “componentwise linear”. It is known that ldE(N)<∞ for all N. But the value can be arbitrary large, while the similar invariant ldS(M) for an S-module M is always at most n. We will show that if IΔ (resp. JΔ) is the squarefree monomial ideal of S (resp. E) corresponding to a simplicial complex Δ⊂2{1,…,n}, then ldE(E/JΔ)=ldS(S/IΔ). Moreover, except some extremal cases, ldE(E/JΔ) is a topological invariant of the geometric realization |Δ∨| of the Alexander dual Δ∨ of Δ. We also show that, when n⩾4, ldE(E/JΔ)=n−2 (this is the largest possible value) if and only if Δ is an n-gon.