Affine Plane

Author

Eric W. Weisstein
August 15, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/Combinatorics/AffinePlane.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/AffinePlane.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Figure

The four parallel classes of the affine plane AG(2,3). Each panel shows the three lines in one parallel class; arithmetic in the labels is modulo 3.

Module[{colors,labels,lineClasses,neutral,offsets,panel,pointFill,points},points=Tuples[Range[0,2],2];lineClasses={Table[Select[points,First[#1]==b&],{b,0,2}],Table[Select[points,Last[#1]==b&],{b,0,2}],Table[Select[points,Mod[Last[#1]-First[#1],3]==b&],{b,0,2}],Table[Select[points,Mod[Last[#1]+First[#1],3]==b&],{b,0,2}]};labels={"x = b","y = b","y = x + b","y = -x + b"};offsets={{0,3},{3,3},{0,0},{3,0}};colors={,,};neutral=LightDarkSwitched[Black,White];pointFill=LightDarkSwitched[White,Black];panel[blocks_,label_,offset_]:={MapThread[{#2,AbsoluteThickness[2.5`],Line[(#1+offset&)/@#1]}&,{blocks,colors}],EdgeForm[{neutral,AbsoluteThickness[1.5`]}],FaceForm[pointFill],(Disk[#1+offset,0.13`]&)/@points,MapIndexed[Text[Style[ToString[First[#2]],12,neutral,FontFamily->"Times"],#1+offset]&,points],Text[Style[label,16,neutral,FontFamily->"Times"],offset+{1,2.5`}]};Graphics[Flatten[MapThread[panel,{lineClasses,labels,offsets}],1],AspectRatio->1]]