Abstract. Both the random matrixes generated by MATLAB and the element-by-element matrix operations in MATLAB are proposed to construct the pixels sequences encryption algorithm of Images. The random matrixes which obey the uniform distribution or normal distribution are used to generate the key stream. By running the element-by-element matrix multiplication and division between the pixels matrix and the key matrix, the sequences of pixels are encrypted and decrypted. This algorithm shows such advantages as good security, simple calculation, and easy availability for programming. Furthermore, the feasibility and stability of the algorithm are demonstrated by experiments.