Dwight Powell came off the bench to contribute 14 points and six boards for the Mavericks, who beat the Lakers for the 12th consecutive time, seven of those occurring at Staples. Devin Harris also scored 14 points, while Dorian Finney-Smith had 12 points.
Matthews, though, gave much of the credit to point guard Deron Williams, who finished with eight points and 11 assists.
"(Williams) in the pick-and-roll really opened up the game for us," said Matthews, who scored half of his points in the decisive third quarter by hitting 3 of 4 from 3-point range. "We got physical on the defensive end and started playing harder, more together. We got a lot of stops and runs. We were making shots, we were getting in a rhythm, we were getting good looks. That's when we were able to open the game up a little bit."
Dallas (10-23) is 4-14 on the road, but three of those victories were registered in Los Angeles. The Mavericks are 2-0 against the Lakers this season and also recorded a win over the Clippers this month.
"I'm not going to get carried away, wins in here are very difficult to come by, and have been," Dallas coach Rick Carlisle said. "We're a pretty humble group for obvious reasons at this point, but I'm proud of the way the guys played."
Julius Randle led Los Angeles (12-24) with 18 points, and Nick Young scored 17. D'Angelo Russell and Jordan Clarkson chipped in 15 points apiece for the Lakers, who fell for the sixth time in seven games and the 14th time in 16.
"We weren't looking to pass to the ball, a lot of one-on-one in the second half. That's some weak basketball," said Young, who scored 12 points in the first quarter.
Dallas played without forward Dirk Nowitzki, who was sidelined due to an illness.
The Mavericks wiped out a seven-point halftime deficit, grabbing a double-digit lead in the third. Back-to-back 3-pointers by Matthews and another trey by Seth Curry rallied the Mavericks to a 73-65 lead with 4:03 left in the third quarter.
By the end of the period, the Mavericks increased the margin to 81-70. They outscored the Lakers 31-13 in the third.
"In the first half, we weren't taking anything away; they were shooting the 3 well," Carlisle said. "They were getting to the free-throw line and shooting a great percentage. So we just said, 'Look, what has gotten us wins this year has been the defensive end, and we just have to recommit right now.'
"They did, a 13-point third quarter defensively, and a 19-point fourth quarter was the recipe to win."
The Lakers used hot shooting to produce a 57-50 edge at the break. Los Angeles connected on 56.8 percent of its shots compared to 48.8 percent for the Mavericks in the first half. Russell led all scorers with 13 first-half points, nine of those coming in the first quarter.
For the game, the Mavericks shot 49.4 percent to 47.1 percent for the Lakers. Dallas connected on 14 of 31 (45.2 percent) from long distance compared to 7 of 19 (36.8 percent) for Los Angeles.
"It's frustrating, but it's where we are right now," Lakers coach Luke Walton said. "I was hopeful and thought we had learned from our past mistakes, but the most frustrating part is that it happened again."
The Mavericks outrebounded the Lakers 42-34. They also enjoyed an advantage in second-chance points, 15-2.
"Defensively, we just have to figure out how to keep guys out of the paint," Clarkson said.
NOTES: Dallas made at least 10 3-pointers for the 12th time in the past 15 games, resulting in an uptick in scoring. The Mavericks are averaging 99.6 points during that span compared to 91 points in their initial 18 games of the season. ... Mavericks G J.J. Barea (left leg muscle strain) missed his fourth consecutive contest. Injuries have kept Barea out of 22 games this season. ... Lakers F Thomas Robinson, who has received an increase in minutes with injured F Larry Nance out, delivered another solid outing with eight points and 10 rebounds in 19 minutes. ... Lakers G Lou Williams converted a free throw in a 44th consecutive game, the longest active streak for an NBA reserve. ... The Mavericks visit the Golden State Warriors on Friday. ... The Lakers resume play Sunday at home against the Toronto Raptors.