# How to write the row equivalent matrices in latex?

I am trying the process performing on a matrix to reduce it to echelon and reduced echelon form as shown in figure I search a lot and tried like $^R\sim$. I am trying to write the symbol used for row equivalence between two matrices but can not write.

• \stackrel{\scriptscriptstyle R}{\sim} should work (IMO the R on the image is why to large so I made it smaller) Apr 9 '20 at 15:02
• Please clarify your typesetting objective. Is to write the letter R with a tilde symbol underneath it?
– Mico
Apr 9 '20 at 15:04
• @Mico Yes sir! R with a tilde underneath Apr 9 '20 at 15:08
• @NoorAslam - Does the output of \documentclass{article} \usepackage{accents} \begin{document} $\underaccent{\tilde}{R}$ \end{document} meet your needs?
– Mico
Apr 9 '20 at 15:10
• It is definitely not an R with a \sim under it. It is a \sim with an R above it. I made the R smaller because on the image the R takes all the attention, but it is just a marker. As far as I remember the R just means that this equivalence is made using a row operation, and this the \sim is the important part not the size of the R. Apr 9 '20 at 15:28

%% Compile and read me!
$\mathrel{\underset{\sim}{R}}\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} \begin{matrix} \\ \,\text{by }\,\mathsf{R}_{1}+\mathsf{R}_{3}\text{ and }\,\mathsf{R}_{2}-\mathsf{2R}_{3}\\ \\ \end{matrix}$

• It should be \mathrel{\underset{\sim}{R}} Apr 9 '20 at 17:23