[...] the SAS/IML language passes arguments by reference, a function that changes the value of an argument also affects the corresponding matrix that was …