Using a microarray-based assay, we studied how the substitution of amino acids in the immediate vicinity of the receptor-binding domain on a peptide affects its binding to a protein. Replicates of 802 linear peptides consisting of the variants of WTHPQFAT and LQWHPQAGK, GKFPIPLGKQSG, and NGQFQVWIPGAQK, different by one amino acid, were synthesized on a glass slide with a maskless photolithography. Using a microarray-compatible label-free optical sensor, we measured the binding curves of streptavidin with the synthesized peptides and extracted the streptavidin-peptide affinity constants. We found that (a) the substitution of one residue in the HPQ motif reduces the affinity constant K a from 108 M-1 by at least 3-4 orders of magnitude, with an exception of HPM; (b) substitution of the immediate flanking residue on the Gln side also causes the affinity to decrease by up to 3-4 orders of magnitude, depending on the substituting residue and the second-neighboring flanking residue; (c) substitution of the flanking residues on the His side has no significant effect on the affinity, possibly due to the strong binding of streptavidin to HPQF and HPQAG motifs. We also found that some of amino acid residues located close to the C-terminus (and the solid surface) improve the yield of peptide synthesis on a glass surface and can be exploited in the fabrication of peptide microarrays.