The Japanese was eight under for his first 14 holes in round two to get to ten under and share the lead with American Bryson DeChambeau.
The South African was celebrating his 30th birthday and he was seven under for the day with four to play, two shots clear of American Patrick Reed.
Matsuyama made a flying start, putting an approach to four feet at the tenth and getting up and down from the sand for a birdie at the par five 11th.
A tee shot to ten feet at the 13th had him within one and when he played an excellent second from the rough and got down in two putts on the par five 15th, he shared the lead.
Playing partner Thomas had also taken advantage of the two par fives on the back nine to sandwich a bogey on the 14th, and he holed a 15 footer on the 16th to make it a three way tie at the top.
A tee shot to eight feet on the next made it a hat-trick of gains and Thomas led alone, wth McIlroy doing well to stay at level for day after poor tee shots on the first and second.
He had to scramble again to save par at the third and fourth but Van Rooyen was having no such trouble as he chipped in at the ninth to turn in 31.
The birthday boy also played the front nine in 31 on day one after being three over after seven holes, and he added to gains on the first, second and sixth.
Thomas was relentless, however, and the man who has fired a 62 here in each of the past two seasons put an approach to 13 feet at the 18th for a fourth birdie in a row and a two shot lead.
Van Rooyen put his second to four feet at the tenth to join the group in second alongside DeChambeau, who had four birdies and a bogey in ten holes after starting on the tenth.
The American then holed from 15 feet on the second and he was just a shot off the lead but he would not be there for long.
Thomas drove the short first and rolled home an eagle from 35 feet to lead by three, an advantage DeChambeau trimmed to two with a tee shot to three feet on the third.
Matsuyama put his tee shot on the first a long way left but made a remarkable up-and-down to get to seven under where he was joined by Van Rooyen, who took advantage of the 11th.
The Japanese drove the par four second to set up a birdie but Van Rooyen kept pace with him again, rolling home from nine feet on the 12th for a fourth birdie in a row.
Matsuyama was flying and when he found the fringe off the tee at the third, he was just one off the lead.
DeChambeau then joined him at nine under with an approach to five feet at the fifth.
That was good enough for a tie for the lead after Thomas made a bogey at the fourth following a poor tee shot.
DeChambeau took advantage of the par five sixth to hit the front but Matsuyama holed from 19 feet on the fifth to join him.
McIlroy hit a poor chip on the ninth to break his run of eight pars with a bogey and slip behind Reed, who made four birdies in a row from the third in his first seven holes.
Hatton had three birdies in his first 12 holes.