<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposals" xlink:href="mtrx-20190630.xsd#AcquisitionsAndDisposals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsDetails" xlink:href="mtrx-20190630.xsd#AcquisitionsAndDisposalsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsDetailsTextual" xlink:href="mtrx-20190630.xsd#AcquisitionsAndDisposalsDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsTables" xlink:href="mtrx-20190630.xsd#AcquisitionsAndDisposalsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:href="mtrx-20190630.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="mtrx-20190630.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquity" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfChangesInStockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncomeParentheticals" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfComprehensiveIncomeParentheticals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfIncome" xlink:href="mtrx-20190630.xsd#ConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/Contingencies" xlink:href="mtrx-20190630.xsd#Contingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ContingenciesDetailsTextual" xlink:href="mtrx-20190630.xsd#ContingenciesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/Debt" xlink:href="mtrx-20190630.xsd#Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtDetails" xlink:href="mtrx-20190630.xsd#DebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtDetailsTextual" xlink:href="mtrx-20190630.xsd#DebtDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtTables" xlink:href="mtrx-20190630.xsd#DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DocumentAndEntityInformation" xlink:href="mtrx-20190630.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShare" xlink:href="mtrx-20190630.xsd#EarningsPerCommonShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails" xlink:href="mtrx-20190630.xsd#EarningsPerCommonShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails1" xlink:href="mtrx-20190630.xsd#EarningsPerCommonShareDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareTables" xlink:href="mtrx-20190630.xsd#EarningsPerCommonShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlans" xlink:href="mtrx-20190630.xsd#EmployeeBenefitPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetails" xlink:href="mtrx-20190630.xsd#EmployeeBenefitPlansDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetailsTextual" xlink:href="mtrx-20190630.xsd#EmployeeBenefitPlansDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansTables" xlink:href="mtrx-20190630.xsd#EmployeeBenefitPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssets" xlink:href="mtrx-20190630.xsd#GoodwillAndOtherIntangibleAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails" xlink:href="mtrx-20190630.xsd#GoodwillAndOtherIntangibleAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails1" xlink:href="mtrx-20190630.xsd#GoodwillAndOtherIntangibleAssetsDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetailsTextual" xlink:href="mtrx-20190630.xsd#GoodwillAndOtherIntangibleAssetsDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsTables" xlink:href="mtrx-20190630.xsd#GoodwillAndOtherIntangibleAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxes" xlink:href="mtrx-20190630.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails1" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails2" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetails2" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails3" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetails3" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails4" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetails4" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetailsTextual" xlink:href="mtrx-20190630.xsd#IncomeTaxesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails5" xlink:href="mtrx-20190630.xsd#IncomeTaxesIncomeTaxesDetails5" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails6" xlink:href="mtrx-20190630.xsd#IncomeTaxesIncomeTaxesDetails6" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesTables" xlink:href="mtrx-20190630.xsd#IncomeTaxesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/OperatingLeases" xlink:href="mtrx-20190630.xsd#OperatingLeases" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/OperatingLeasesDetailsTextual" xlink:href="mtrx-20190630.xsd#OperatingLeasesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:href="mtrx-20190630.xsd#QuarterlyFinancialDataUnauditedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedQuarterlyFinancialDataUnaudited" xlink:href="mtrx-20190630.xsd#QuarterlyFinancialDataUnauditedQuarterlyFinancialDataUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedTables" xlink:href="mtrx-20190630.xsd#QuarterlyFinancialDataUnauditedTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueRevenue" xlink:href="mtrx-20190630.xsd#RevenueRevenue" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueRevenueDetails" xlink:href="mtrx-20190630.xsd#RevenueRevenueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueRevenueTables" xlink:href="mtrx-20190630.xsd#RevenueRevenueTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformation" xlink:href="mtrx-20190630.xsd#SegmentInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:href="mtrx-20190630.xsd#SegmentInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails1" xlink:href="mtrx-20190630.xsd#SegmentInformationDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetailsTextual" xlink:href="mtrx-20190630.xsd#SegmentInformationDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationTables" xlink:href="mtrx-20190630.xsd#SegmentInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensation" xlink:href="mtrx-20190630.xsd#StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails" xlink:href="mtrx-20190630.xsd#StockBasedCompensationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails1" xlink:href="mtrx-20190630.xsd#StockBasedCompensationDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails2" xlink:href="mtrx-20190630.xsd#StockBasedCompensationDetails2" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails3" xlink:href="mtrx-20190630.xsd#StockBasedCompensationDetails3" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetailsTextual" xlink:href="mtrx-20190630.xsd#StockBasedCompensationDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationTables" xlink:href="mtrx-20190630.xsd#StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockholdersEquity" xlink:href="mtrx-20190630.xsd#StockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockholdersEquityDetailsTextual" xlink:href="mtrx-20190630.xsd#StockholdersEquityDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPolicies" xlink:href="mtrx-20190630.xsd#SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesDetailsTextual" xlink:href="mtrx-20190630.xsd#SummaryOfSignificantAccountingPoliciesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:href="mtrx-20190630.xsd#SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesSummaryOfSignificantAccountingPoliciesImpactOfNewAccountingPronouncementDetails" xlink:href="mtrx-20190630.xsd#SummaryOfSignificantAccountingPoliciesSummaryOfSignificantAccountingPoliciesImpactOfNewAccountingPronouncementDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccounts" xlink:href="mtrx-20190630.xsd#ValuationAndQualifyingAccounts" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccountsDetails" xlink:href="mtrx-20190630.xsd#ValuationAndQualifyingAccountsDetails" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposals" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_CA6201D4547BF50A0C77F9264D0099EE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_CA6201D4547BF50A0C77F9264D0099EE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_8B6FC6969D5095E4B9BFF9264D0021ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_CA6201D4547BF50A0C77F9264D0099EE" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_8B6FC6969D5095E4B9BFF9264D0021ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8B6FC6969D5095E4B9BFF9264D0021ED" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8B6FC6969D5095E4B9BFF9264D0021ED" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_08FB4872912AB34670ECF9264D00D83C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:to="loc_mtrx_HoustonInterestsLLCMember_08FB4872912AB34670ECF9264D00D83C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_68163A39F9BED9EDF575F9264D0092D5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_68163A39F9BED9EDF575F9264D0092D5" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HDBInc.Member" xlink:label="loc_mtrx_HDBInc.Member_D058A640F4137863F831F9264D0025B4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:to="loc_mtrx_HDBInc.Member_D058A640F4137863F831F9264D0025B4" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_KvaernerNorthAmericanConstructionMember" xlink:label="loc_mtrx_KvaernerNorthAmericanConstructionMember_6E89553BC63685087C4BF9264D00682D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:to="loc_mtrx_KvaernerNorthAmericanConstructionMember_6E89553BC63685087C4BF9264D00682D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PelichemIndustrialCleaningServicesLlcMember" xlink:label="loc_mtrx_PelichemIndustrialCleaningServicesLlcMember_9C2F2CC56CB32E465C41F9264D005E9B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D161FF0F4B0FF3477103F9264D00EEFD" xlink:to="loc_mtrx_PelichemIndustrialCleaningServicesLlcMember_9C2F2CC56CB32E465C41F9264D005E9B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_CC67FAF8E0542AE2502DF9264D0003FE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_CC67FAF8E0542AE2502DF9264D0003FE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Cashpaidforequityinterest" xlink:label="loc_mtrx_Cashpaidforequityinterest_E28A9E8DCD0E0197C6A3F9264D00E72F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_Cashpaidforequityinterest_E28A9E8DCD0E0197C6A3F9264D00E72F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement" xlink:label="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_D9B2340591B1ED5EA496F9264D00738C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_D9B2340591B1ED5EA496F9264D00738C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Cashconsiderationpaid" xlink:label="loc_mtrx_Cashconsiderationpaid_59AFE0079EF3A0B22F1EF9264D00B0AE" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_Cashconsiderationpaid_59AFE0079EF3A0B22F1EF9264D00B0AE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Accruedworkingcapitaladjustment" xlink:label="loc_mtrx_Accruedworkingcapitaladjustment_D7BF2B72C6851DAA9CB4F9264D007DDD" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_Accruedworkingcapitaladjustment_D7BF2B72C6851DAA9CB4F9264D007DDD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_CEFC29C2EC09F7A6F8DEF9264D00F0D8" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_CEFC29C2EC09F7A6F8DEF9264D00F0D8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts" xlink:label="loc_mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts_0DD5DD778AEF426E6B3AF9264D003957" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts_0DD5DD778AEF426E6B3AF9264D003957" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets_7D0F70A1DFD8B9CF3720F9264D008D2C" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets_7D0F70A1DFD8B9CF3720F9264D008D2C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_FE3966A1A61286EC732EF9264D00D248" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_FE3966A1A61286EC732EF9264D00D248" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_D9ECCB8FF62CC9D6F1AAF9264D000782" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_D9ECCB8FF62CC9D6F1AAF9264D000782" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_D49135DC313C6BC903A2F9264D00088A" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_Goodwill_D49135DC313C6BC903A2F9264D00088A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount" xlink:label="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_25382E933BECE8090797F9264D004886" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_25382E933BECE8090797F9264D004886" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_653C81A31B2818B3CDEFF9264D00C160" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_653C81A31B2818B3CDEFF9264D00C160" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_EE83B94C491E70330DF3F9264D005079" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_EE83B94C491E70330DF3F9264D005079" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_421ADAEDB3CA76B58CA2F9264D008C4F" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_421ADAEDB3CA76B58CA2F9264D008C4F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_B0747055B6E67657E1F0F9264D0F2A62" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_B0747055B6E67657E1F0F9264D0F2A62" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings" xlink:label="loc_mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings_3F72C044B6C181ED38E3F9264D0F5F7E" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings_3F72C044B6C181ED38E3F9264D0F5F7E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6892329A5CF0C6126676F9264D0F9E59" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6892329A5CF0C6126676F9264D0F9E59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_7678D5048B9F1BBB3831F9264D0FB2E2" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_7678D5048B9F1BBB3831F9264D0FB2E2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_EBBADD1D333B16829A58F9264D0F800A" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_EBBADD1D333B16829A58F9264D0F800A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt_7C287EB9DD25E827C042F9264D0FE1B7" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt_7C287EB9DD25E827C042F9264D0FE1B7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_A17068BFDB28A9D7E724F9264D0FE854" xlink:type="locator" />
    <link:definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_A17068BFDB28A9D7E724F9264D0FE854" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_9CBD5AF316CC466681B0F936C19392CC" xlink:type="locator" />
    <link:definitionArc order="23" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedLiabilities_9CBD5AF316CC466681B0F936C19392CC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationAcquisitionOfLessThan100PercentNoncontrollingInterestFairValue" xlink:label="loc_us-gaap_BusinessCombinationAcquisitionOfLessThan100PercentNoncontrollingInterestFairValue_4AE6C244F3AAA98D0DCCF9264D0F45BD" xlink:type="locator" />
    <link:definitionArc order="24" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionOfLessThan100PercentNoncontrollingInterestFairValue_4AE6C244F3AAA98D0DCCF9264D0F45BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_FF0072214F44136C558CF9264D0FF034" xlink:type="locator" />
    <link:definitionArc order="25" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_FF0072214F44136C558CF9264D0FF034" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_553644AC7E04ABDB75F8F9264D0F8EEE" xlink:type="locator" />
    <link:definitionArc order="26" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_553644AC7E04ABDB75F8F9264D0F8EEE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionProFormaInformationAbstract" xlink:label="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:type="locator" />
    <link:definitionArc order="27" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_EABBA164EFAA698A27DEF9264D0042DA" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionsProFormaRevenue" xlink:label="loc_us-gaap_BusinessAcquisitionsProFormaRevenue_D71F03BDB5C7709BE0FAF9264D0F7FA7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_us-gaap_BusinessAcquisitionsProFormaRevenue_D71F03BDB5C7709BE0FAF9264D0F7FA7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss" xlink:label="loc_us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss_7135DD5D6EF84B7189A3F9264D0FB556" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss_7135DD5D6EF84B7189A3F9264D0FB556" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionProFormaEarningsPerShareBasic" xlink:label="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareBasic_87883C3B3C46D1E987A6F9264D0FBF3D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareBasic_87883C3B3C46D1E987A6F9264D0FBF3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionProFormaEarningsPerShareDiluted" xlink:label="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareDiluted_B5520BD6EEDF5A9B7E6AF9264D0F1307" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareDiluted_B5520BD6EEDF5A9B7E6AF9264D0F1307" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Proformaacquisitioncosts" xlink:label="loc_mtrx_Proformaacquisitioncosts_2AA3A7285BF49AFC2884F9264D0F963C" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_mtrx_Proformaacquisitioncosts_2AA3A7285BF49AFC2884F9264D0F963C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Proformaacquisitioncostsamortizedovertime" xlink:label="loc_mtrx_Proformaacquisitioncostsamortizedovertime_ABD340A8D0F0F9C14269F9264D0F078A" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_mtrx_Proformaacquisitioncostsamortizedovertime_ABD340A8D0F0F9C14269F9264D0F078A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Proformainterestexpense" xlink:label="loc_mtrx_Proformainterestexpense_DF1A401C8450E6D97E5DF9264D0FAD66" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_mtrx_Proformainterestexpense_DF1A401C8450E6D97E5DF9264D0FAD66" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Proformadepreciationandamortizationexpense" xlink:label="loc_mtrx_Proformadepreciationandamortizationexpense_D9F39F88262E51175B4AF9264D0F5FC0" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_mtrx_Proformadepreciationandamortizationexpense_D9F39F88262E51175B4AF9264D0F5FC0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Proformaincometaxexpense" xlink:label="loc_mtrx_Proformaincometaxexpense_18B9EC42CB0EB63594B1F9264D0FB031" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_455B4500DD117B62DA6BF9264D0F1C60" xlink:to="loc_mtrx_Proformaincometaxexpense_18B9EC42CB0EB63594B1F9264D0FB031" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_3181601779A97E62DCA7F92653A7DD9D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_3181601779A97E62DCA7F92653A7DD9D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_56D258EAB8A02B4A475BF92653A7F2F2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_3181601779A97E62DCA7F92653A7DD9D" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_56D258EAB8A02B4A475BF92653A7F2F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_56D258EAB8A02B4A475BF92653A7F2F2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_56D258EAB8A02B4A475BF92653A7F2F2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_3BA94924E845A06017EDF92653A7A089" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:to="loc_mtrx_HoustonInterestsLLCMember_3BA94924E845A06017EDF92653A7A089" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_C34B5804A896EDEEEB83F92653A7DE8E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_C34B5804A896EDEEEB83F92653A7DE8E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HDBInc.Member" xlink:label="loc_mtrx_HDBInc.Member_994268C0542C9CE1FD8DF92653A7F026" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:to="loc_mtrx_HDBInc.Member_994268C0542C9CE1FD8DF92653A7F026" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_KvaernerNorthAmericanConstructionMember" xlink:label="loc_mtrx_KvaernerNorthAmericanConstructionMember_B73614DFF0BC952E0822F92653A74754" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:to="loc_mtrx_KvaernerNorthAmericanConstructionMember_B73614DFF0BC952E0822F92653A74754" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ProcessHeatingEquipmentBusinessMember" xlink:label="loc_mtrx_ProcessHeatingEquipmentBusinessMember_C9485C2E69434460F102F932C330DC5C" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_92405F21E26174320822F92653A77971" xlink:to="loc_mtrx_ProcessHeatingEquipmentBusinessMember_C9485C2E69434460F102F932C330DC5C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromDivestitureOfBusinesses" xlink:label="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_7B5AD5CB7D3A945322DDF92653A75815" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_7B5AD5CB7D3A945322DDF92653A75815" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement" xlink:label="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_C463F3471916161F72E5F92C165F5912" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_C463F3471916161F72E5F92C165F5912" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfBusiness" xlink:label="loc_us-gaap_GainLossOnSaleOfBusiness_99766E2B01D0937E01E0F93441517B87" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_GainLossOnSaleOfBusiness_99766E2B01D0937E01E0F93441517B87" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_178C60DDDF2EA68A0B23F92653A7F2EF" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_178C60DDDF2EA68A0B23F92653A7F2EF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionEffectiveDateOfAcquisition1" xlink:label="loc_us-gaap_BusinessAcquisitionEffectiveDateOfAcquisition1_EA65CFBBCCD16220B63CF92653A71363" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessAcquisitionEffectiveDateOfAcquisition1_EA65CFBBCCD16220B63CF92653A71363" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired" xlink:label="loc_us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired_0350BCEC736E20286462F92653A706D6" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired_0350BCEC736E20286462F92653A706D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_C66E96C794AFC79F041CF92653A7F290" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_C66E96C794AFC79F041CF92653A7F290" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Economicpurchaseprice" xlink:label="loc_mtrx_Economicpurchaseprice_3FD8745DD61460465108F92653A7861F" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_Economicpurchaseprice_3FD8745DD61460465108F92653A7861F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_BE0FDDFA555FD297B9EDF92653A77307" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_Goodwill_BE0FDDFA555FD297B9EDF92653A77307" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount" xlink:label="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_C41E2CA90953D1554E9FF92653A78518" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_C41E2CA90953D1554E9FF92653A78518" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:label="loc_us-gaap_EquityMethodInvestmentOwnershipPercentage_089584AC6F9D6CB05E47F92653A71F36" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_EquityMethodInvestmentOwnershipPercentage_089584AC6F9D6CB05E47F92653A71F36" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Mtrx_JointVentureValue" xlink:label="loc_mtrx_Mtrx_JointVentureValue_1A4AD2782641396737A7F92653A7191A" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_Mtrx_JointVentureValue_1A4AD2782641396737A7F92653A7191A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Mtrx_ControllingInterestOfJointVentureValue" xlink:label="loc_mtrx_Mtrx_ControllingInterestOfJointVentureValue_6C0F0D6E90150699D791F92653A7E886" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_Mtrx_ControllingInterestOfJointVentureValue_6C0F0D6E90150699D791F92653A7E886" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MinorityInterestInJointVentures" xlink:label="loc_us-gaap_MinorityInterestInJointVentures_73DFC3E01D87FC5541DBF92653A74CD9" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_MinorityInterestInJointVentures_73DFC3E01D87FC5541DBF92653A74CD9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Warrantyreserveworkingcapitalprovision" xlink:label="loc_mtrx_Warrantyreserveworkingcapitalprovision_A3338B0CA34B1A86D72AF92653A786DE" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_Warrantyreserveworkingcapitalprovision_A3338B0CA34B1A86D72AF92653A786DE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Settlementofwarrantyreserve" xlink:label="loc_mtrx_Settlementofwarrantyreserve_187EB58CD599135A490AF92653A79A4A" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_Settlementofwarrantyreserve_187EB58CD599135A490AF92653A79A4A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationSeparatelyRecognizedTransactionsAdditionalDisclosuresAcquisitionCostExpensed" xlink:label="loc_us-gaap_BusinessCombinationSeparatelyRecognizedTransactionsAdditionalDisclosuresAcquisitionCostExpensed_64B54CB3F5B221EA2E31F92653A79EAC" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessCombinationSeparatelyRecognizedTransactionsAdditionalDisclosuresAcquisitionCostExpensed_64B54CB3F5B221EA2E31F92653A79EAC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual" xlink:label="loc_us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual_02DFCBD4867427728B7DF92653A7793E" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual_02DFCBD4867427728B7DF92653A7793E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationProFormaInformationEarningsOrLossOfAcquireeSinceAcquisitionDateActual" xlink:label="loc_us-gaap_BusinessCombinationProFormaInformationEarningsOrLossOfAcquireeSinceAcquisitionDateActual_60D98118A86D48C8914EF92653A726DF" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_us-gaap_BusinessCombinationProFormaInformationEarningsOrLossOfAcquireeSinceAcquisitionDateActual_60D98118A86D48C8914EF92653A726DF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets" xlink:label="loc_mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets_734461F6E09B27461358F92653A7A262" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets_734461F6E09B27461358F92653A7A262" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BusinessAcquisitionProFormaDepreciationExpense" xlink:label="loc_mtrx_BusinessAcquisitionProFormaDepreciationExpense_0204100C3A0DA7E6BAE6F92653A7DA8C" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_BusinessAcquisitionProFormaDepreciationExpense_0204100C3A0DA7E6BAE6F92653A7DA8C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement" xlink:label="loc_mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement_D93C7B15C60522AE58D8F92653A7A4D3" xlink:type="locator" />
    <link:definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_51ABE826CE1839A1D0D8F92653A7D0DA" xlink:to="loc_mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement_D93C7B15C60522AE58D8F92653A7A4D3" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsAndDisposalsTables" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_724B6CA71E09ED95CA22F8359AEECA47" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_590C161457633B764579F8359AEC0E93" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_724B6CA71E09ED95CA22F8359AEECA47" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_590C161457633B764579F8359AEC0E93" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_6A345BB0189BC1FC62F6F8359AED9776" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_590C161457633B764579F8359AEC0E93" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_6A345BB0189BC1FC62F6F8359AED9776" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6A345BB0189BC1FC62F6F8359AED9776" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6A345BB0189BC1FC62F6F8359AED9776" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_3FEE8826B994502D1FD9F8359AEDA86B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064" xlink:to="loc_mtrx_HoustonInterestsLLCMember_3FEE8826B994502D1FD9F8359AEDA86B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_1795C9A7E98EE8511C07F8359AEDAA32" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C67CFBA9DA98342EB703F8359AED3064" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_1795C9A7E98EE8511C07F8359AEDAA32" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ConsiderationtransferredTableTextBlock" xlink:label="loc_mtrx_ConsiderationtransferredTableTextBlock_B982F9ECF3D7B0FF18ACF8359AEE1402" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_724B6CA71E09ED95CA22F8359AEECA47" xlink:to="loc_mtrx_ConsiderationtransferredTableTextBlock_B982F9ECF3D7B0FF18ACF8359AEE1402" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock" xlink:label="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_5D2CB2D273F66466CCF3F8359AEE1415" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_724B6CA71E09ED95CA22F8359AEECA47" xlink:to="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_5D2CB2D273F66466CCF3F8359AEE1415" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionProFormaInformationTextBlock" xlink:label="loc_us-gaap_BusinessAcquisitionProFormaInformationTextBlock_60B4654C9168AFDCBE9FF8359AEEF779" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_724B6CA71E09ED95CA22F8359AEECA47" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaInformationTextBlock_60B4654C9168AFDCBE9FF8359AEEF779" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquity" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_95471397B2F1F80104DBF76C8F6DDDFC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_us-gaap_StatementTable_95471397B2F1F80104DBF76C8F6DDDFC" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_A6E668A790B91D66BAE5F76C8F6D5F3B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_95471397B2F1F80104DBF76C8F6DDDFC" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_A6E668A790B91D66BAE5F76C8F6D5F3B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_A6E668A790B91D66BAE5F76C8F6D5F3B" xlink:to="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_A6E668A790B91D66BAE5F76C8F6D5F3B" xlink:to="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_EA09C8DEF7CD6C35D242F76C8F6DCD0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_CommonStockMember_EA09C8DEF7CD6C35D242F76C8F6DCD0D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_8FF2C3266564581FD44AF76C8F6D5ABA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_8FF2C3266564581FD44AF76C8F6D5ABA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_80CB86427F2D54A02A48F76C8F6D147E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_RetainedEarningsMember_80CB86427F2D54A02A48F76C8F6D147E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockMember" xlink:label="loc_us-gaap_TreasuryStockMember_4A64ABC3E0F18DDB69F3F76C8F6D1260" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_TreasuryStockMember_4A64ABC3E0F18DDB69F3F76C8F6D1260" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_34E8B78AE491C7C676EAF76C8F6D9566" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_34E8B78AE491C7C676EAF76C8F6D9566" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncontrollingInterestMember" xlink:label="loc_us-gaap_NoncontrollingInterestMember_3278874439BE7F569FB3F76C8F6DDB78" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_CE5543342C85FEECCC25F76C8F6D09E1" xlink:to="loc_us-gaap_NoncontrollingInterestMember_3278874439BE7F569FB3F76C8F6DDB78" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption" xlink:label="loc_us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption_7F4A1DDEE962AFC99FC3F76C8F6D621E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption_7F4A1DDEE962AFC99FC3F76C8F6D621E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Beginningequitybalancesasadjusted" xlink:label="loc_mtrx_Beginningequitybalancesasadjusted_14F50D66522A08C854C6F76C8F6D9D6B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_mtrx_Beginningequitybalancesasadjusted_14F50D66522A08C854C6F76C8F6D9D6B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_9695480BBADA000194C5F76C8F7D3308" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_9695480BBADA000194C5F76C8F7D3308" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncontrollingInterestIncreaseFromSubsidiaryEquityIssuance" xlink:label="loc_us-gaap_NoncontrollingInterestIncreaseFromSubsidiaryEquityIssuance_974F0D29193ECD367448F76C8F7D752A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_NoncontrollingInterestIncreaseFromSubsidiaryEquityIssuance_974F0D29193ECD367448F76C8F7D752A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss" xlink:label="loc_us-gaap_ProfitLoss_269D2045ECA9394F4BDEF76C8F7D71BC" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_ProfitLoss_269D2045ECA9394F4BDEF76C8F7D71BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_B0CF9D6F73AC10A289D1F76C8F7D795D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_B0CF9D6F73AC10A289D1F76C8F7D795D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_63965F0439FC6C1C57CAF76C8F7D52E8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_63965F0439FC6C1C57CAF76C8F7D52E8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_4D2BCAAD54114A6BD5E2F76C8F7DAB32" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_4D2BCAAD54114A6BD5E2F76C8F7DAB32" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IssuanceOfDeferredShares" xlink:label="loc_mtrx_IssuanceOfDeferredShares_0FF82995F5A7CDF1286DF76C8F7D1B0A" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_mtrx_IssuanceOfDeferredShares_0FF82995F5A7CDF1286DF76C8F7D1B0A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OtherTreasurySharePurchases" xlink:label="loc_mtrx_OtherTreasurySharePurchases_E9A09C9A5B6837A91566F76C8F7DC54A" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_mtrx_OtherTreasurySharePurchases_E9A09C9A5B6837A91566F76C8F7DC54A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation_F9B1AD1488E0840975F1F76C8F7DB77E" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation_F9B1AD1488E0840975F1F76C8F7DB77E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_C1D8B1843C52158CF39AF76C8F7D2B8B" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_C1D8B1843C52158CF39AF76C8F7D2B8B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_FB56AD69A825012EE90FF76C8F7D60EA" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_FB56AD69A825012EE90FF76C8F7D60EA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireInterestInJointVenture" xlink:label="loc_us-gaap_PaymentsToAcquireInterestInJointVenture_1D4BB64A3E32FF1B81D9F76C8F7DC567" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_0A034B8DF420319368CEF76C8F7D4F73" xlink:to="loc_us-gaap_PaymentsToAcquireInterestInJointVenture_1D4BB64A3E32FF1B81D9F76C8F7DC567" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_4C788A33BBEDDD566FB2F76C8F7D887D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_us-gaap_NetIncomeLoss_4C788A33BBEDDD566FB2F76C8F7D887D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_44251E4B58E3D3FF5026F76C8F7DBCF5" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_3957BF1AC9E16E3BECB9F76C8F6D9DB2" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_44251E4B58E3D3FF5026F76C8F7DBCF5" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_89C9CFD7DC8959C8A2D23AC9B38098E5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_us-gaap_StatementTable_89C9CFD7DC8959C8A2D23AC9B38098E5" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_DECCDBDE35105649A2E99A538133D0C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_89C9CFD7DC8959C8A2D23AC9B38098E5" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_DECCDBDE35105649A2E99A538133D0C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_DECCDBDE35105649A2E99A538133D0C7" xlink:to="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_DF80768B754E5DF78C644594297F20D3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_DECCDBDE35105649A2E99A538133D0C7" xlink:to="loc_us-gaap_EquityComponentDomain_DF80768B754E5DF78C644594297F20D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_353591A4278953B8ADA2A9D4DFC2F987" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_DF80768B754E5DF78C644594297F20D3" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_353591A4278953B8ADA2A9D4DFC2F987" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_E7DE037A28B550179B928E97572BB65B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_DF80768B754E5DF78C644594297F20D3" xlink:to="loc_us-gaap_RetainedEarningsMember_E7DE037A28B550179B928E97572BB65B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockMember" xlink:label="loc_us-gaap_TreasuryStockMember_42FA12E9FDE255D48E2DE481116B619F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_DF80768B754E5DF78C644594297F20D3" xlink:to="loc_us-gaap_TreasuryStockMember_42FA12E9FDE255D48E2DE481116B619F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_C36B2EF1B75056E7809C1B8459A4A873" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_C36B2EF1B75056E7809C1B8459A4A873" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_BE5549501DA1513987D39876E9D88417" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_BE5549501DA1513987D39876E9D88417" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_037047215C615A92A3B20D9E2BABF81A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_037047215C615A92A3B20D9E2BABF81A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_DeferredSharesIssued" xlink:label="loc_mtrx_DeferredSharesIssued_CDB885C631FB5826B7D7E3C39FD083DA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_mtrx_DeferredSharesIssued_CDB885C631FB5826B7D7E3C39FD083DA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OtherTreasurySharesAcquired" xlink:label="loc_mtrx_OtherTreasurySharesAcquired_AC8DC6E9E4265C6EAF125CA20CE59AEF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_83B54CCF05F85973BD825272917CEFCC" xlink:to="loc_mtrx_OtherTreasurySharesAcquired_AC8DC6E9E4265C6EAF125CA20CE59AEF" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncomeParentheticals" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfIncome" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/Contingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ContingenciesDetailsTextual" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/Debt" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_F98F8B11325DE3CA1A5FFDE5B8B9E21F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable" xlink:label="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3FE36B7904E48A74FF95FDE5B8B9DDEA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_F98F8B11325DE3CA1A5FFDE5B8B9E21F" xlink:to="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3FE36B7904E48A74FF95FDE5B8B9DDEA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_VariableRateAxis" xlink:label="loc_us-gaap_VariableRateAxis_55BCED32D0EAD08EAE6FFDE5B8B9872E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3FE36B7904E48A74FF95FDE5B8B9DDEA" xlink:to="loc_us-gaap_VariableRateAxis_55BCED32D0EAD08EAE6FFDE5B8B9872E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_55BCED32D0EAD08EAE6FFDE5B8B9872E" xlink:to="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_55BCED32D0EAD08EAE6FFDE5B8B9872E" xlink:to="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CdorRateMember" xlink:label="loc_mtrx_CdorRateMember_AE249B4348209B8F3102FDE5B8B96E88" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D" xlink:to="loc_mtrx_CdorRateMember_AE249B4348209B8F3102FDE5B8B96E88" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CanadianPrimeRateMember" xlink:label="loc_mtrx_CanadianPrimeRateMember_31D1CB0F704B0E21BB3FFDE5B8B98EC6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_598DD8B833C7528B5622FDE5B8B9FB2D" xlink:to="loc_mtrx_CanadianPrimeRateMember_31D1CB0F704B0E21BB3FFDE5B8B98EC6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_0E543C12A82DFD58DBEFFDE5B8B9EE54" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3FE36B7904E48A74FF95FDE5B8B9DDEA" xlink:to="loc_srt_RangeAxis_0E543C12A82DFD58DBEFFDE5B8B9EE54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_0E543C12A82DFD58DBEFFDE5B8B9EE54" xlink:to="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_0E543C12A82DFD58DBEFFDE5B8B9EE54" xlink:to="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_811AD0132BD0C8DFCE52FDE5B8B95DD9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5" xlink:to="loc_srt_MinimumMember_811AD0132BD0C8DFCE52FDE5B8B95DD9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_A98F7FC1E8591C0C00AFFDE5B8B94ED3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_1B38ADCAC93380727305FDE5B8B969E5" xlink:to="loc_srt_MaximumMember_A98F7FC1E8591C0C00AFFDE5B8B94ED3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_DebtTextualAbstract" xlink:label="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_F98F8B11325DE3CA1A5FFDE5B8B9E21F" xlink:to="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_F059F4773F2212AD38F8FDE5B8B98D39" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_F059F4773F2212AD38F8FDE5B8B98D39" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityExpirationDate1" xlink:label="loc_us-gaap_LineOfCreditFacilityExpirationDate1_EF8BBB34D2EB3AA03D70FDE5B8B984B4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_us-gaap_LineOfCreditFacilityExpirationDate1_EF8BBB34D2EB3AA03D70FDE5B8B984B4" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_SeniorLeverageRatioMaximum" xlink:label="loc_mtrx_SeniorLeverageRatioMaximum_B4A762195A64F37D8965FDE5B8B9C903" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_SeniorLeverageRatioMaximum_B4A762195A64F37D8965FDE5B8B9C903" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_SeniorLeverageRatioMinimum" xlink:label="loc_mtrx_SeniorLeverageRatioMinimum_D06EABCAC8F47D8F78F0FDE5B8B92719" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_SeniorLeverageRatioMinimum_D06EABCAC8F47D8F78F0FDE5B8B92719" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_FixedChargeCoverageRatioMaximum" xlink:label="loc_mtrx_FixedChargeCoverageRatioMaximum_AD70811349C7ABBC6131FDE5B8B9FB75" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_FixedChargeCoverageRatioMaximum_AD70811349C7ABBC6131FDE5B8B9FB75" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_FixedChargeCoverageRatioMinimum" xlink:label="loc_mtrx_FixedChargeCoverageRatioMinimum_220FB2329DD981DD35BCFDE5B8B922F3" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_FixedChargeCoverageRatioMinimum_220FB2329DD981DD35BCFDE5B8B922F3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AmountOfLimitOnAssetDispositions" xlink:label="loc_mtrx_AmountOfLimitOnAssetDispositions_161B0BA1135605EB3C27FDE5B8B9502E" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_AmountOfLimitOnAssetDispositions_161B0BA1135605EB3C27FDE5B8B9502E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling" xlink:label="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_F67070BF31A47F5D4402FDE5B8B9A102" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_F67070BF31A47F5D4402FDE5B8B9A102" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Sublimitonlettersofcreditunderthecreditfacility" xlink:label="loc_mtrx_Sublimitonlettersofcreditunderthecreditfacility_E41D6B74CBD9639B3CCAFDE5B8B950C7" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_Sublimitonlettersofcreditunderthecreditfacility_E41D6B74CBD9639B3CCAFDE5B8B950C7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_44013CBF5816BA4A0EFCFDE5B8B97E6C" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_44013CBF5816BA4A0EFCFDE5B8B97E6C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_B65DD34124A7E747C33FFDE5B8B9B0A1" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_B65DD34124A7E747C33FFDE5B8B9B0A1" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_90895268A3C209470F65FDE5B8B96312" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_90895268A3C209470F65FDE5B8B96312" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_ECF4132717B62DDAE794FDE5B8B90256" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_ECF4132717B62DDAE794FDE5B8B90256" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_229A51C1C7CD9A27C4CDFDE5B8B99C5E" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_229A51C1C7CD9A27C4CDFDE5B8B99C5E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_C72183DD4C6E6174B7B2FDE5B8B9C259" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_C72183DD4C6E6174B7B2FDE5B8B9C259" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage" xlink:label="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_36C630454503D18079EFFDE5B8B987A6" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_36C630454503D18079EFFDE5B8B987A6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MaximumLimitOfConsolidatedFundedIndebtedness" xlink:label="loc_mtrx_MaximumLimitOfConsolidatedFundedIndebtedness_32CAF197EF51699E8B7FFDE5B8B942B3" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_MaximumLimitOfConsolidatedFundedIndebtedness_32CAF197EF51699E8B7FFDE5B8B942B3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement" xlink:label="loc_mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement_29E79B8C17FA7FA3F7B7FDE5B8B9718A" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement_29E79B8C17FA7FA3F7B7FDE5B8B9718A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ConsolidatedFundedIndebtedness" xlink:label="loc_mtrx_ConsolidatedFundedIndebtedness_5FB0D6A1E88188D2DA38FDE5B8B9C0EC" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_DA60CE8625BE95B7CA13FDE5B8B9014E" xlink:to="loc_mtrx_ConsolidatedFundedIndebtedness_5FB0D6A1E88188D2DA38FDE5B8B9C0EC" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DocumentAndEntityInformation" xlink:type="extended">
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityInformationLineItems" xlink:label="loc_dei_EntityInformationLineItems_2E30B31BE0ED43B764A3FC55187E73D1" xlink:type="locator" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntitiesTable" xlink:label="loc_dei_EntitiesTable_55ABE4EDFB20D0A54756FC55187EF428" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_2E30B31BE0ED43B764A3FC55187E73D1" xlink:to="loc_dei_EntitiesTable_55ABE4EDFB20D0A54756FC55187EF428" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_5BBC03D36B634D3915ADFC55187ED119" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_55ABE4EDFB20D0A54756FC55187EF428" xlink:to="loc_dei_LegalEntityAxis_5BBC03D36B634D3915ADFC55187ED119" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_02D5AAE1BF57130C4271FC55187E64E8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_5BBC03D36B634D3915ADFC55187ED119" xlink:to="loc_dei_EntityDomain_02D5AAE1BF57130C4271FC55187E64E8_default" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_02D5AAE1BF57130C4271FC55187E64E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_5BBC03D36B634D3915ADFC55187ED119" xlink:to="loc_dei_EntityDomain_02D5AAE1BF57130C4271FC55187E64E8" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsPerCommonShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails1" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_F09E3ACB6C27590295376CA11AB3EFFC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_66E0EE8128345AC29216FD2E21E6C443" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_F09E3ACB6C27590295376CA11AB3EFFC" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_66E0EE8128345AC29216FD2E21E6C443" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_71A3F3257CC55E1F926CA71709D2A85B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_66E0EE8128345AC29216FD2E21E6C443" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_71A3F3257CC55E1F926CA71709D2A85B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_71A3F3257CC55E1F926CA71709D2A85B" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E2C6352532AF5AD4826D76017F42C2B7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_71A3F3257CC55E1F926CA71709D2A85B" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E2C6352532AF5AD4826D76017F42C2B7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_787788B197A9579FA489A95C199135C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E2C6352532AF5AD4826D76017F42C2B7" xlink:to="loc_us-gaap_EmployeeStockOptionMember_787788B197A9579FA489A95C199135C7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_NonvestedDeferredSharesMember" xlink:label="loc_mtrx_NonvestedDeferredSharesMember_DC04B3753F4C5B2486F4959A5CC6D693" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E2C6352532AF5AD4826D76017F42C2B7" xlink:to="loc_mtrx_NonvestedDeferredSharesMember_DC04B3753F4C5B2486F4959A5CC6D693" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract" xlink:label="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_6DAFBE4B02CA554AACFAE199AF765802" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_F09E3ACB6C27590295376CA11AB3EFFC" xlink:to="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_6DAFBE4B02CA554AACFAE199AF765802" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_C9FC46D62A2353D5A06F8ECFD1A2C5F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_6DAFBE4B02CA554AACFAE199AF765802" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_C9FC46D62A2353D5A06F8ECFD1A2C5F7" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsPerCommonShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EmployeeBenefitPlans" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansLineItems" xlink:label="loc_us-gaap_MultiemployerPlansLineItems_2AAF46D229B1EE7EE133FA491A15E6E1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfMultiemployerPlansTable" xlink:label="loc_us-gaap_ScheduleOfMultiemployerPlansTable_894E8B5D446831A27D37FA491A091D28" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_2AAF46D229B1EE7EE133FA491A15E6E1" xlink:to="loc_us-gaap_ScheduleOfMultiemployerPlansTable_894E8B5D446831A27D37FA491A091D28" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlanTypeAxis" xlink:label="loc_us-gaap_MultiemployerPlanTypeAxis_0D941762D18D250AC959FA491A0A9CFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_894E8B5D446831A27D37FA491A091D28" xlink:to="loc_us-gaap_MultiemployerPlanTypeAxis_0D941762D18D250AC959FA491A0A9CFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansTypeDomain" xlink:label="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_0D941762D18D250AC959FA491A0A9CFD" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansTypeDomain" xlink:label="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_0D941762D18D250AC959FA491A0A9CFD" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BoilermakerBlacksmithNationalPensionTrustMember" xlink:label="loc_mtrx_BoilermakerBlacksmithNationalPensionTrustMember_CA65A43CB54137C59BE5FA491A0F9484" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_BoilermakerBlacksmithNationalPensionTrustMember_CA65A43CB54137C59BE5FA491A0F9484" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_JointPensionFundLocalUnionOneSixFourIbewMember" xlink:label="loc_mtrx_JointPensionFundLocalUnionOneSixFourIbewMember_A144794A3A2D8E87E377FA491A0FAA0F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_JointPensionFundLocalUnionOneSixFourIbewMember_A144794A3A2D8E87E377FA491A0FAA0F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain" xlink:label="loc_mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain_CACEF3A01045051490C1FA491A108835" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain_CACEF3A01045051490C1FA491A108835" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain" xlink:label="loc_mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain_C607E91CD62BEA23A9EAFA491A10FB5A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain_C607E91CD62BEA23A9EAFA491A10FB5A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_LocalThreeFiveOneIbewPensionPlanMember" xlink:label="loc_mtrx_LocalThreeFiveOneIbewPensionPlanMember_7DBAA5CA126DA12A3091FA491A103CF8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_LocalThreeFiveOneIbewPensionPlanMember_7DBAA5CA126DA12A3091FA491A103CF8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain" xlink:label="loc_mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain_E08EF6F968E99532E729FA491A105ACC" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain_E08EF6F968E99532E729FA491A105ACC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IBEWLocalUnionNineEightPensionPlanMember" xlink:label="loc_mtrx_IBEWLocalUnionNineEightPensionPlanMember_95D739AA334BAFB645CAFA491A101FE7" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IBEWLocalUnionNineEightPensionPlanMember_95D739AA334BAFB645CAFA491A101FE7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IndianaLaborersPensionFundDomain" xlink:label="loc_mtrx_IndianaLaborersPensionFundDomain_2BA7B47FF3CEDBD78391FA491A115FB0" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IndianaLaborersPensionFundDomain_2BA7B47FF3CEDBD78391FA491A115FB0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IronworkersMidAmericaPensionPlanMember" xlink:label="loc_mtrx_IronworkersMidAmericaPensionPlanMember_BF300E383C38BB30282AFA491A118CFA" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IronworkersMidAmericaPensionPlanMember_BF300E383C38BB30282AFA491A118CFA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PipefittersRetirementFundLocalFiveNineSevenMember" xlink:label="loc_mtrx_PipefittersRetirementFundLocalFiveNineSevenMember_93D617E93C578B05E0D1FA491A119292" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_PipefittersRetirementFundLocalFiveNineSevenMember_93D617E93C578B05E0D1FA491A119292" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IronWorkersPensionPlanofWesternPennsylvaniaLocal3Member" xlink:label="loc_mtrx_IronWorkersPensionPlanofWesternPennsylvaniaLocal3Member_7D3ADEAAD0BB0611215EFA491A11BCAB" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IronWorkersPensionPlanofWesternPennsylvaniaLocal3Member_7D3ADEAAD0BB0611215EFA491A11BCAB" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IronWorkersPensionPlanLoc.55Member" xlink:label="loc_mtrx_IronWorkersPensionPlanLoc.55Member_61100101EDA755AABBC4FA491A11C022" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_IronWorkersPensionPlanLoc.55Member_61100101EDA755AABBC4FA491A11C022" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_NationalElectricalBenefitFundLocal488Member" xlink:label="loc_mtrx_NationalElectricalBenefitFundLocal488Member_CC6AADE8FD3F55D56F98FA491A147519" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_NationalElectricalBenefitFundLocal488Member_CC6AADE8FD3F55D56F98FA491A147519" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ConnecticutPlumbersandPipefittersPensionFundLocal777Member" xlink:label="loc_mtrx_ConnecticutPlumbersandPipefittersPensionFundLocal777Member_D5BAB7D9DB41EA4A90AAFA4AF2890DE1" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_82F10F76DED6C835BAE8FA491A0A0B9E" xlink:to="loc_mtrx_ConnecticutPlumbersandPipefittersPensionFundLocal777Member_D5BAB7D9DB41EA4A90AAFA4AF2890DE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDateDescription" xlink:label="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDateDescription_D75A05426BE0589EF8FAFA491A1578C1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_2AAF46D229B1EE7EE133FA491A15E6E1" xlink:to="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDateDescription_D75A05426BE0589EF8FAFA491A1578C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansAbstract" xlink:label="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_2AAF46D229B1EE7EE133FA491A15E6E1" xlink:to="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlansNumber" xlink:label="loc_mtrx_MultiemployerPlansNumber_502AB754740FE132241DFA491A15FC26" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_mtrx_MultiemployerPlansNumber_502AB754740FE132241DFA491A15FC26" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlansCertifiedZoneStatusDescription" xlink:label="loc_mtrx_MultiemployerPlansCertifiedZoneStatusDescription_0832AB0B46D579ABA64EFA491A1668D7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_mtrx_MultiemployerPlansCertifiedZoneStatusDescription_0832AB0B46D579ABA64EFA491A1668D7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansCertifiedZoneStatus" xlink:label="loc_us-gaap_MultiemployerPlansCertifiedZoneStatus_3EC5C5AA48F3D02F9FC3FA491A162E4B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_us-gaap_MultiemployerPlansCertifiedZoneStatus_3EC5C5AA48F3D02F9FC3FA491A162E4B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansFundingImprovementPlanAndRehabilitationPlan" xlink:label="loc_us-gaap_MultiemployerPlansFundingImprovementPlanAndRehabilitationPlan_7147F672AABEC528A6B9FA491A16AFD5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_us-gaap_MultiemployerPlansFundingImprovementPlanAndRehabilitationPlan_7147F672AABEC528A6B9FA491A16AFD5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlanContributionsByEmployer" xlink:label="loc_us-gaap_MultiemployerPlanContributionsByEmployer_594E557093B916FFCB82FA491A16D9AC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_us-gaap_MultiemployerPlanContributionsByEmployer_594E557093B916FFCB82FA491A16D9AC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlanSurcharge" xlink:label="loc_mtrx_MultiemployerPlanSurcharge_8F5894468615C8470703FA491A164AF9" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_mtrx_MultiemployerPlanSurcharge_8F5894468615C8470703FA491A164AF9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansSurcharge" xlink:label="loc_us-gaap_MultiemployerPlansSurcharge_157803ABC7FDF79F10EDFA491A1643F4" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_us-gaap_MultiemployerPlansSurcharge_157803ABC7FDF79F10EDFA491A1643F4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDate" xlink:label="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDate_ACF4F9267C137F5A0F00FA491A161495" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDate_ACF4F9267C137F5A0F00FA491A161495" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ContributionsToOtherMultiemployerPlans" xlink:label="loc_mtrx_ContributionsToOtherMultiemployerPlans_F0E43E27149210682418FA491A17D718" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_CC7A06FEDAF13ACAA091FA491A157F46" xlink:to="loc_mtrx_ContributionsToOtherMultiemployerPlans_F0E43E27149210682418FA491A17D718" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansLineItems" xlink:label="loc_us-gaap_MultiemployerPlansLineItems_54424FF38F615E10A73E2AC72A9FEDF0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfMultiemployerPlansTable" xlink:label="loc_us-gaap_ScheduleOfMultiemployerPlansTable_849AB32979E758BCA44560F9064ABB24" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_54424FF38F615E10A73E2AC72A9FEDF0" xlink:to="loc_us-gaap_ScheduleOfMultiemployerPlansTable_849AB32979E758BCA44560F9064ABB24" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlanTypeAxis" xlink:label="loc_us-gaap_MultiemployerPlanTypeAxis_1C335367B73A536BB65230BB1C0B6C95" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_849AB32979E758BCA44560F9064ABB24" xlink:to="loc_us-gaap_MultiemployerPlanTypeAxis_1C335367B73A536BB65230BB1C0B6C95" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansTypeDomain" xlink:label="loc_us-gaap_MultiemployerPlansTypeDomain_31E7E942E9CAFC691156C4478BADC94B_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_1C335367B73A536BB65230BB1C0B6C95" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_31E7E942E9CAFC691156C4478BADC94B_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MultiemployerPlansTypeDomain" xlink:label="loc_us-gaap_MultiemployerPlansTypeDomain_146C273A8CC85F728408B53A7E3B3E07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_1C335367B73A536BB65230BB1C0B6C95" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_146C273A8CC85F728408B53A7E3B3E07" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember" xlink:label="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_AC8719F86BFD5A6CBF06F663F3584CFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_146C273A8CC85F728408B53A7E3B3E07" xlink:to="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_AC8719F86BFD5A6CBF06F663F3584CFD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlanZoneByTypeAxis" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeAxis_D10EE333DB545A158324B95B75C2AA35" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_849AB32979E758BCA44560F9064ABB24" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeAxis_D10EE333DB545A158324B95B75C2AA35" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlanZoneByTypeDomain" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeAxis_D10EE333DB545A158324B95B75C2AA35" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MultiemployerPlanZoneByTypeDomain" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeDomain_A2B6836A82FE55F38CC976B84C035939" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeAxis_D10EE333DB545A158324B95B75C2AA35" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeDomain_A2B6836A82FE55F38CC976B84C035939" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ZoneRedMember" xlink:label="loc_mtrx_ZoneRedMember_76D7CD35F36652588635AC202AB4CBAE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_A2B6836A82FE55F38CC976B84C035939" xlink:to="loc_mtrx_ZoneRedMember_76D7CD35F36652588635AC202AB4CBAE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ZoneYellowMember" xlink:label="loc_mtrx_ZoneYellowMember_DF69C0C0320055D0B1D1F80C00DD6E92" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_A2B6836A82FE55F38CC976B84C035939" xlink:to="loc_mtrx_ZoneYellowMember_DF69C0C0320055D0B1D1F80C00DD6E92" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ZoneGreenMember" xlink:label="loc_mtrx_ZoneGreenMember_D259EE9D69955384940F98A0F116ED3C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_A2B6836A82FE55F38CC976B84C035939" xlink:to="loc_mtrx_ZoneGreenMember_D259EE9D69955384940F98A0F116ED3C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PercentageOfPlanFunded" xlink:label="loc_mtrx_PercentageOfPlanFunded_EF4C33969B1D5614A60014D932EE4AAA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_54424FF38F615E10A73E2AC72A9FEDF0" xlink:to="loc_mtrx_PercentageOfPlanFunded_EF4C33969B1D5614A60014D932EE4AAA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_DescriptionOfFundedPortionOfPlan" xlink:label="loc_mtrx_DescriptionOfFundedPortionOfPlan_898BF59A7F975CBE9CBE93796B6C34ED" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_54424FF38F615E10A73E2AC72A9FEDF0" xlink:to="loc_mtrx_DescriptionOfFundedPortionOfPlan_898BF59A7F975CBE9CBE93796B6C34ED" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillLineItems" xlink:label="loc_us-gaap_GoodwillLineItems_2F9280F3CBB158A2A191F92C5D4AE602" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfGoodwillTable" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_EF369155FCAFF2284A6DF92C5D4AAB62" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_2F9280F3CBB158A2A191F92C5D4AE602" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_EF369155FCAFF2284A6DF92C5D4AAB62" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_69620B798496FCCE3B95F92C5D4A8091" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF369155FCAFF2284A6DF92C5D4AAB62" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_69620B798496FCCE3B95F92C5D4A8091" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_69620B798496FCCE3B95F92C5D4A8091" xlink:to="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_69620B798496FCCE3B95F92C5D4A8091" xlink:to="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_C5AAE027478565478F16F92C5D4A2B0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:to="loc_mtrx_ElectricalInfrastructureMember_C5AAE027478565478F16F92C5D4A2B0F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_A9A30D46763E3AE286B7F92C5D4AB97B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:to="loc_mtrx_OilGasAndChemicalMember_A9A30D46763E3AE286B7F92C5D4AB97B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_7D76F62AF29A945F2B45F92C5D4AAB36" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:to="loc_mtrx_StorageSolutionsMember_7D76F62AF29A945F2B45F92C5D4AAB36" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_83136D9923A9356588EEF92C5D4A51D3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:to="loc_mtrx_IndustrialMember_83136D9923A9356588EEF92C5D4A51D3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ReportingUnitMember" xlink:label="loc_mtrx_ReportingUnitMember_5237033977EB92CA0EA0F92C5D4A2214" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D24C53301FF3B2381F1AF92C5D4A0CB8" xlink:to="loc_mtrx_ReportingUnitMember_5237033977EB92CA0EA0F92C5D4A2214" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillRollForward" xlink:label="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_2F9280F3CBB158A2A191F92C5D4AE602" xlink:to="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillGross" xlink:label="loc_us-gaap_GoodwillGross_33485662BEF0D14220CCF92C5D4A1DB9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillGross_33485662BEF0D14220CCF92C5D4A1DB9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_A2D0647A37D3DEB60EE5F92C5D4A46C0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_A2D0647A37D3DEB60EE5F92C5D4A46C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_91EBD4655719BC2899F3F92C5D4AE55C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_Goodwill_91EBD4655719BC2899F3F92C5D4AE55C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement" xlink:label="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_D5F5CC207E27F8E8357CF92C5D4A227D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_D5F5CC207E27F8E8357CF92C5D4A227D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillAcquiredDuringPeriod" xlink:label="loc_us-gaap_GoodwillAcquiredDuringPeriod_1094A3C0A63533B827B4F92C5D4A75D9" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_1094A3C0A63533B827B4F92C5D4A75D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_BD10C874DBE72352FC99F92C5D4A2B65" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_BD10C874DBE72352FC99F92C5D4A2B65" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillForeignCurrencyTranslationGainLoss" xlink:label="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_60C9B7A3CF32D82A2CC2F92C5D4A09AF" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_60C9B7A3CF32D82A2CC2F92C5D4A09AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit" xlink:label="loc_us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit_BE184C2D7014A3587878F942F381CD4E" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit_BE184C2D7014A3587878F942F381CD4E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount" xlink:label="loc_us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount_125AB63C946A8CF132F7F92C5D4A2980" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_BA6A1A2C109AA5A6D988F92C5D4A5B87" xlink:to="loc_us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount_125AB63C946A8CF132F7F92C5D4A2980" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails1" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_208391B86E1552F79DE0CEF7E2A461C0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_208391B86E1552F79DE0CEF7E2A461C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_C5EA914329CB76E09D40C4478C3BB431_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_208391B86E1552F79DE0CEF7E2A461C0" xlink:to="loc_us-gaap_SegmentDomain_C5EA914329CB76E09D40C4478C3BB431_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_F8DA5ABA915655D7BE5511409F032000" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_208391B86E1552F79DE0CEF7E2A461C0" xlink:to="loc_us-gaap_SegmentDomain_F8DA5ABA915655D7BE5511409F032000" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ReportingUnitMember" xlink:label="loc_mtrx_ReportingUnitMember_AC8821E6F2785EE3BE09D8D3E1CEE693" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_F8DA5ABA915655D7BE5511409F032000" xlink:to="loc_mtrx_ReportingUnitMember_AC8821E6F2785EE3BE09D8D3E1CEE693" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_FAF8D8D2974858B2A5EBECEE9D00F3DA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_FAF8D8D2974858B2A5EBECEE9D00F3DA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FAF8D8D2974858B2A5EBECEE9D00F3DA" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3AE7D9B02B6E543790C4C95CD4D9D153" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FAF8D8D2974858B2A5EBECEE9D00F3DA" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3AE7D9B02B6E543790C4C95CD4D9D153" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_4853D9F3BBE15606A6F229C7E9C1F7E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3AE7D9B02B6E543790C4C95CD4D9D153" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_4853D9F3BBE15606A6F229C7E9C1F7E8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_21A756C224695C5B8439EE7EBDC4273C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3AE7D9B02B6E543790C4C95CD4D9D153" xlink:to="loc_mtrx_HoustonInterestsLLCMember_21A756C224695C5B8439EE7EBDC4273C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_5E21E219AB69528EAB8CCCDC7CD1947A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_5E21E219AB69528EAB8CCCDC7CD1947A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_5E21E219AB69528EAB8CCCDC7CD1947A" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_5E21E219AB69528EAB8CCCDC7CD1947A" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_SMElectricTradeNameMember" xlink:label="loc_mtrx_SMElectricTradeNameMember_BC14DE1BBF6D5C74BA4531DC2DA07564" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:to="loc_mtrx_SMElectricTradeNameMember_BC14DE1BBF6D5C74BA4531DC2DA07564" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntellectualPropertyMember" xlink:label="loc_us-gaap_IntellectualPropertyMember_C4CEE630967D5C659DF655CB1AE99A49" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:to="loc_us-gaap_IntellectualPropertyMember_C4CEE630967D5C659DF655CB1AE99A49" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerBasedMember" xlink:label="loc_mtrx_CustomerBasedMember_6C4CEFB90AB753EB918CFD8A0004457D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:to="loc_mtrx_CustomerBasedMember_6C4CEFB90AB753EB918CFD8A0004457D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncompeteAgreementsMember" xlink:label="loc_us-gaap_NoncompeteAgreementsMember_E2465A0A0F0C5AAB9362812A9DB389B3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:to="loc_us-gaap_NoncompeteAgreementsMember_E2465A0A0F0C5AAB9362812A9DB389B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TradeNamesMember" xlink:label="loc_us-gaap_TradeNamesMember_454A5F8E3B535BB0A20F4AA6E33D0C7D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_074B528A77EC5DC895A898AEE5769E1A" xlink:to="loc_us-gaap_TradeNamesMember_454A5F8E3B535BB0A20F4AA6E33D0C7D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_A45866D92AA4554FBD72612980D0BFB6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_A45866D92AA4554FBD72612980D0BFB6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_05C662716FBFEC5CADECC4478C3F78AA_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_A45866D92AA4554FBD72612980D0BFB6" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_05C662716FBFEC5CADECC4478C3F78AA_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_066FDF7A5D3258D48514C935B0E35FDF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_A45866D92AA4554FBD72612980D0BFB6" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_066FDF7A5D3258D48514C935B0E35FDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TradeNamesMember" xlink:label="loc_us-gaap_TradeNamesMember_630301136679514A83A8B5C80A9C4D49" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_066FDF7A5D3258D48514C935B0E35FDF" xlink:to="loc_us-gaap_TradeNamesMember_630301136679514A83A8B5C80A9C4D49" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_13B6B05FDBE95F898FD81886E9E60D9B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E9CB28643FC5C5C80A99BDC0B28F6EE" xlink:to="loc_srt_RangeAxis_13B6B05FDBE95F898FD81886E9E60D9B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_13B6B05FDBE95F898FD81886E9E60D9B" xlink:to="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_34651C8B6EC9570B9407AACEFBC65E7C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_13B6B05FDBE95F898FD81886E9E60D9B" xlink:to="loc_srt_RangeMember_34651C8B6EC9570B9407AACEFBC65E7C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_3E79C8A5A8E85C3FB210D76045B4F853" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_34651C8B6EC9570B9407AACEFBC65E7C" xlink:to="loc_srt_MinimumMember_3E79C8A5A8E85C3FB210D76045B4F853" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_2F1692656EBD55FD9F5621B2F845E586" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_34651C8B6EC9570B9407AACEFBC65E7C" xlink:to="loc_srt_MaximumMember_2F1692656EBD55FD9F5621B2F845E586" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AmortizationOfIntangibleAssets" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_CA3B854AA9B1520C9CE22FE86A3F89E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_CA3B854AA9B1520C9CE22FE86A3F89E8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedTradeNamesGross" xlink:label="loc_us-gaap_FiniteLivedTradeNamesGross_6D0A2BD813E55D5D87C4217C57353737" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:to="loc_us-gaap_FiniteLivedTradeNamesGross_6D0A2BD813E55D5D87C4217C57353737" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsFairValueDisclosure" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsFairValueDisclosure_F8EC9BB843DA55FBBCC6E97BE09A691A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsFairValueDisclosure_F8EC9BB843DA55FBBCC6E97BE09A691A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_0ABE9A0D804B5332A824B7C9847CE91C" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_EE9126D660F952E29B903A88E067951F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_EE9126D660F952E29B903A88E067951F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_8ABDCBD65F49503CAC508EC0FB29F6CD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_8ABDCBD65F49503CAC508EC0FB29F6CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_A6AEF80DC6AC525DAE29D8CEC4E4B52E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_A6AEF80DC6AC525DAE29D8CEC4E4B52E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsNet" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_42D03478B3A3538F89C87A43E92CD1D4" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_42D03478B3A3538F89C87A43E92CD1D4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IndefiniteLivedTradeNames" xlink:label="loc_us-gaap_IndefiniteLivedTradeNames_3437FC07B05257EFA78D063FF8D4DFC4" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_IndefiniteLivedTradeNames_3437FC07B05257EFA78D063FF8D4DFC4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsGrossExcludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsGrossExcludingGoodwill_3EC10D9DDA675A2B822D1BE68118E551" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_IntangibleAssetsGrossExcludingGoodwill_3EC10D9DDA675A2B822D1BE68118E551" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill" xlink:label="loc_mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill_31BD0E5BBC6B5D8FAB102406E3154EF7" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill_31BD0E5BBC6B5D8FAB102406E3154EF7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_4E69C53C4AB151AB87AE842F4DBE6943" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_4E69C53C4AB151AB87AE842F4DBE6943" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Netbookvalueofintangibleassetatriskofimpairment" xlink:label="loc_mtrx_Netbookvalueofintangibleassetatriskofimpairment_2CB5B33E3149531A806F02919A864FF9" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_0ADFD22B959D5D43B7D3B3B2C6D0982F" xlink:to="loc_mtrx_Netbookvalueofintangibleassetatriskofimpairment_2CB5B33E3149531A806F02919A864FF9" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetailsTextual" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxes" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails1" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails2" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails3" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails4" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetailsTextual" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails5" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardLineItems" xlink:label="loc_us-gaap_TaxCreditCarryforwardLineItems_7F2CC67F437C5DE1B0C27C7D7947E740" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardTable" xlink:label="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_7F2CC67F437C5DE1B0C27C7D7947E740" xlink:to="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IncomeTaxAuthorityDescriptionAxis" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_B67606D1F42C55E68B51A111903D53F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_B67606D1F42C55E68B51A111903D53F0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IncomeTaxAuthorityDescriptionDomain" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_B67606D1F42C55E68B51A111903D53F0" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IncomeTaxAuthorityDescriptionDomain" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_F920B9EB0A845002B7F7178E80DD3836" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_B67606D1F42C55E68B51A111903D53F0" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_F920B9EB0A845002B7F7178E80DD3836" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_StatetaxcreditMember" xlink:label="loc_mtrx_StatetaxcreditMember_188098E2A32451018C1AB3553A811E81" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_F920B9EB0A845002B7F7178E80DD3836" xlink:to="loc_mtrx_StatetaxcreditMember_188098E2A32451018C1AB3553A811E81" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_FederaltaxcreditcarryforwardMember" xlink:label="loc_mtrx_FederaltaxcreditcarryforwardMember_1D0D38E7E2C85EFEBAE3914C3B119E5A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_F920B9EB0A845002B7F7178E80DD3836" xlink:to="loc_mtrx_FederaltaxcreditcarryforwardMember_1D0D38E7E2C85EFEBAE3914C3B119E5A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ForeigntaxcreditcarryforwardMember" xlink:label="loc_mtrx_ForeigntaxcreditcarryforwardMember_4A6B9DD72D3856C1BE4EC631BEF2F83D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_F920B9EB0A845002B7F7178E80DD3836" xlink:to="loc_mtrx_ForeigntaxcreditcarryforwardMember_4A6B9DD72D3856C1BE4EC631BEF2F83D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardAxis" xlink:label="loc_us-gaap_TaxCreditCarryforwardAxis_D9BC6330C59D5DB7A123288DD746A67E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:to="loc_us-gaap_TaxCreditCarryforwardAxis_D9BC6330C59D5DB7A123288DD746A67E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardNameDomain" xlink:label="loc_us-gaap_TaxCreditCarryforwardNameDomain_87D1720C7EB4688A8252C4478BF7D766_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxCreditCarryforwardAxis_D9BC6330C59D5DB7A123288DD746A67E" xlink:to="loc_us-gaap_TaxCreditCarryforwardNameDomain_87D1720C7EB4688A8252C4478BF7D766_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardNameDomain" xlink:label="loc_us-gaap_TaxCreditCarryforwardNameDomain_9580FC7B86125D7282881C71534CF889" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxCreditCarryforwardAxis_D9BC6330C59D5DB7A123288DD746A67E" xlink:to="loc_us-gaap_TaxCreditCarryforwardNameDomain_9580FC7B86125D7282881C71534CF889" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameAxis_773EF1974D385263AA6943DDC73FD3C2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameAxis_773EF1974D385263AA6943DDC73FD3C2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_958C7D52A976705AB760C4478BF7034F_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_773EF1974D385263AA6943DDC73FD3C2" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_958C7D52A976705AB760C4478BF7034F_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_1240899DBE0456D4A80260CD305534C0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_773EF1974D385263AA6943DDC73FD3C2" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_1240899DBE0456D4A80260CD305534C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodAxis" xlink:label="loc_us-gaap_TaxPeriodAxis_FEBC1F7219A55587BDD6F44332CF525F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_2251B1AB7C275F6E9B49251FB7340CEA" xlink:to="loc_us-gaap_TaxPeriodAxis_FEBC1F7219A55587BDD6F44332CF525F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:label="loc_us-gaap_TaxPeriodDomain_105486F187A7192524D4C4478BF83415_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxPeriodAxis_FEBC1F7219A55587BDD6F44332CF525F" xlink:to="loc_us-gaap_TaxPeriodDomain_105486F187A7192524D4C4478BF83415_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:label="loc_us-gaap_TaxPeriodDomain_6F3A37E0D7555F06A0572BB32F7A1019" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxPeriodAxis_FEBC1F7219A55587BDD6F44332CF525F" xlink:to="loc_us-gaap_TaxPeriodDomain_6F3A37E0D7555F06A0572BB32F7A1019" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardDescription" xlink:label="loc_us-gaap_TaxCreditCarryforwardDescription_69B40AAC563F59AF8664B127A680A171" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_7F2CC67F437C5DE1B0C27C7D7947E740" xlink:to="loc_us-gaap_TaxCreditCarryforwardDescription_69B40AAC563F59AF8664B127A680A171" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardAmount" xlink:label="loc_us-gaap_TaxCreditCarryforwardAmount_ED4FC6EDE2A256C282813F776A3AAF53" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_7F2CC67F437C5DE1B0C27C7D7947E740" xlink:to="loc_us-gaap_TaxCreditCarryforwardAmount_ED4FC6EDE2A256C282813F776A3AAF53" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails6" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLossCarryforwardsLineItems" xlink:label="loc_us-gaap_OperatingLossCarryforwardsLineItems_F975319B8C9A577F9BB52E5E3B30F3BE" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLossCarryforwardsTable" xlink:label="loc_us-gaap_OperatingLossCarryforwardsTable_5D9E5F3A07A558B58B3C5028DCA48415" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_F975319B8C9A577F9BB52E5E3B30F3BE" xlink:to="loc_us-gaap_OperatingLossCarryforwardsTable_5D9E5F3A07A558B58B3C5028DCA48415" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityAxis_F6A33DC535D452919A44F287CD69A1A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_5D9E5F3A07A558B58B3C5028DCA48415" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_F6A33DC535D452919A44F287CD69A1A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_F6A33DC535D452919A44F287CD69A1A8" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_0944B1AE2BC45E5E972EDC504B5152B6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_F6A33DC535D452919A44F287CD69A1A8" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_0944B1AE2BC45E5E972EDC504B5152B6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StateAndLocalJurisdictionMember" xlink:label="loc_us-gaap_StateAndLocalJurisdictionMember_9E4F53550D945D4580D702C68D2E87F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_0944B1AE2BC45E5E972EDC504B5152B6" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_9E4F53550D945D4580D702C68D2E87F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ForeignCountryMember" xlink:label="loc_us-gaap_ForeignCountryMember_DF35E2C62E1A58EEAE660DA3CA997D01" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_0944B1AE2BC45E5E972EDC504B5152B6" xlink:to="loc_us-gaap_ForeignCountryMember_DF35E2C62E1A58EEAE660DA3CA997D01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameAxis_7CF69993D3915B2F803404B541161924" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_5D9E5F3A07A558B58B3C5028DCA48415" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameAxis_7CF69993D3915B2F803404B541161924" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_A5C5F09A8668FA1567F6C5E500E01525_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_7CF69993D3915B2F803404B541161924" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_A5C5F09A8668FA1567F6C5E500E01525_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_B0A993605A685C2397A996AC2298D5CD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_7CF69993D3915B2F803404B541161924" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_B0A993605A685C2397A996AC2298D5CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodAxis" xlink:label="loc_us-gaap_TaxPeriodAxis_1FDB3FCE91F85DBD81D06790409CE557" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_5D9E5F3A07A558B58B3C5028DCA48415" xlink:to="loc_us-gaap_TaxPeriodAxis_1FDB3FCE91F85DBD81D06790409CE557" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:label="loc_us-gaap_TaxPeriodDomain_2CB1D9C41C3EFC53655DC5E500E0FDD1_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxPeriodAxis_1FDB3FCE91F85DBD81D06790409CE557" xlink:to="loc_us-gaap_TaxPeriodDomain_2CB1D9C41C3EFC53655DC5E500E0FDD1_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:label="loc_us-gaap_TaxPeriodDomain_40AACD3DABDB58C1B183EBAC3F0C1021" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxPeriodAxis_1FDB3FCE91F85DBD81D06790409CE557" xlink:to="loc_us-gaap_TaxPeriodDomain_40AACD3DABDB58C1B183EBAC3F0C1021" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLossCarryforwardsLimitationsOnUse" xlink:label="loc_us-gaap_OperatingLossCarryforwardsLimitationsOnUse_87323B9BFA6053D78DA990CE4C7AA721" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_F975319B8C9A577F9BB52E5E3B30F3BE" xlink:to="loc_us-gaap_OperatingLossCarryforwardsLimitationsOnUse_87323B9BFA6053D78DA990CE4C7AA721" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLossCarryforwards" xlink:label="loc_us-gaap_OperatingLossCarryforwards_55BEAFCA6E14511C8AD299EFACF1136A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_F975319B8C9A577F9BB52E5E3B30F3BE" xlink:to="loc_us-gaap_OperatingLossCarryforwards_55BEAFCA6E14511C8AD299EFACF1136A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/OperatingLeases" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/OperatingLeasesDetailsTextual" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedQuarterlyFinancialDataUnaudited" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueRevenue" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueRevenueDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_E5AC0608A83E042DE460FDB7DF1AB5DB" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisaggregationOfRevenueTable" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_E5AC0608A83E042DE460FDB7DF1AB5DB" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ProductOrServiceAxis" xlink:label="loc_srt_ProductOrServiceAxis_2DADFD0EAF40DD7529EAFDB7DF162605" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_srt_ProductOrServiceAxis_2DADFD0EAF40DD7529EAFDB7DF162605" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ProductsAndServicesDomain" xlink:label="loc_srt_ProductsAndServicesDomain_AA8BF50C95038373D634FDB7DF172EA5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_2DADFD0EAF40DD7529EAFDB7DF162605" xlink:to="loc_srt_ProductsAndServicesDomain_AA8BF50C95038373D634FDB7DF172EA5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ProductsAndServicesDomain" xlink:label="loc_srt_ProductsAndServicesDomain_AA8BF50C95038373D634FDB7DF172EA5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_2DADFD0EAF40DD7529EAFDB7DF162605" xlink:to="loc_srt_ProductsAndServicesDomain_AA8BF50C95038373D634FDB7DF172EA5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_328C9A985029B7FE1E42FDB7DF17E3FA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_srt_StatementGeographicalAxis_328C9A985029B7FE1E42FDB7DF17E3FA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_328C9A985029B7FE1E42FDB7DF17E3FA" xlink:to="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_328C9A985029B7FE1E42FDB7DF17E3FA" xlink:to="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_7D08691BA854B2D7F0C2FDB7DF179C50" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943" xlink:to="loc_country_US_7D08691BA854B2D7F0C2FDB7DF179C50" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_CA" xlink:label="loc_country_CA_09BF91C27C5D84134FC0FDB7DF18A013" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943" xlink:to="loc_country_CA_09BF91C27C5D84134FC0FDB7DF18A013" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OtherinternationalMember" xlink:label="loc_mtrx_OtherinternationalMember_AC3DBCB67C9EF0E744DBFDB7DF18E086" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_11413A16ED4A80C53435FDB7DF17F943" xlink:to="loc_mtrx_OtherinternationalMember_AC3DBCB67C9EF0E744DBFDB7DF18E086" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingAxis" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_784B208EC397139083BCFDB7DF18BC0F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_784B208EC397139083BCFDB7DF18BC0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_AB9CFC8D5D6E94D6DBDFFDB7DF187BEC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_784B208EC397139083BCFDB7DF18BC0F" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_AB9CFC8D5D6E94D6DBDFFDB7DF187BEC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_AB9CFC8D5D6E94D6DBDFFDB7DF187BEC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_784B208EC397139083BCFDB7DF18BC0F" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_AB9CFC8D5D6E94D6DBDFFDB7DF187BEC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationAxis" xlink:label="loc_us-gaap_ContractWithCustomerDurationAxis_C1ADE1AB0CD013E4BD5EFDB7DF1936C7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_us-gaap_ContractWithCustomerDurationAxis_C1ADE1AB0CD013E4BD5EFDB7DF1936C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationDomain" xlink:label="loc_us-gaap_ContractWithCustomerDurationDomain_6E358EF9973FCE075378FDB7DF197341_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerDurationAxis_C1ADE1AB0CD013E4BD5EFDB7DF1936C7" xlink:to="loc_us-gaap_ContractWithCustomerDurationDomain_6E358EF9973FCE075378FDB7DF197341_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationDomain" xlink:label="loc_us-gaap_ContractWithCustomerDurationDomain_6E358EF9973FCE075378FDB7DF197341" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerDurationAxis_C1ADE1AB0CD013E4BD5EFDB7DF1936C7" xlink:to="loc_us-gaap_ContractWithCustomerDurationDomain_6E358EF9973FCE075378FDB7DF197341" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceAxis" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_6FC51440792E21B21B5EFDB7DF199247" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_6FC51440792E21B21B5EFDB7DF199247" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_632AFE300B302ACCC8D3FDB7DF19C238_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_6FC51440792E21B21B5EFDB7DF199247" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_632AFE300B302ACCC8D3FDB7DF19C238_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_632AFE300B302ACCC8D3FDB7DF19C238" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_6FC51440792E21B21B5EFDB7DF199247" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_632AFE300B302ACCC8D3FDB7DF19C238" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerSalesChannelAxis" xlink:label="loc_us-gaap_ContractWithCustomerSalesChannelAxis_AC8C88F6F527B0E5EBBCFDB7DF19BE8C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_us-gaap_ContractWithCustomerSalesChannelAxis_AC8C88F6F527B0E5EBBCFDB7DF19BE8C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerSalesChannelDomain" xlink:label="loc_us-gaap_ContractWithCustomerSalesChannelDomain_1B7072D513B9780C831AFDB7DF1982DE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerSalesChannelAxis_AC8C88F6F527B0E5EBBCFDB7DF19BE8C" xlink:to="loc_us-gaap_ContractWithCustomerSalesChannelDomain_1B7072D513B9780C831AFDB7DF1982DE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerSalesChannelDomain" xlink:label="loc_us-gaap_ContractWithCustomerSalesChannelDomain_1B7072D513B9780C831AFDB7DF1982DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerSalesChannelAxis_AC8C88F6F527B0E5EBBCFDB7DF19BE8C" xlink:to="loc_us-gaap_ContractWithCustomerSalesChannelDomain_1B7072D513B9780C831AFDB7DF1982DE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MajorCustomersAxis" xlink:label="loc_srt_MajorCustomersAxis_BF1260E0E2956DD13A74FDB7DF1AF6C6" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_65666E0CE8E436B9AFD1FDB7DF16C1FD" xlink:to="loc_srt_MajorCustomersAxis_BF1260E0E2956DD13A74FDB7DF1AF6C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:label="loc_srt_NameOfMajorCustomerDomain_645A8FD854DE7E6E5308FDB7DF1A3F56_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_BF1260E0E2956DD13A74FDB7DF1AF6C6" xlink:to="loc_srt_NameOfMajorCustomerDomain_645A8FD854DE7E6E5308FDB7DF1A3F56_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:label="loc_srt_NameOfMajorCustomerDomain_645A8FD854DE7E6E5308FDB7DF1A3F56" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_BF1260E0E2956DD13A74FDB7DF1AF6C6" xlink:to="loc_srt_NameOfMajorCustomerDomain_645A8FD854DE7E6E5308FDB7DF1A3F56" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_E40E9E01AD6CE0030AF9FDB7DF1A2D31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_E5AC0608A83E042DE460FDB7DF1AB5DB" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_E40E9E01AD6CE0030AF9FDB7DF1A2D31" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueRevenueTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_5B745425DFC754229027EADEAE768EE0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5B62C357676A52649FC3D55E1D031548" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5B745425DFC754229027EADEAE768EE0" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5B62C357676A52649FC3D55E1D031548" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsAxis" xlink:label="loc_srt_ConsolidationItemsAxis_CD3CA73BAF9958BBB32E902463B0DA1D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5B62C357676A52649FC3D55E1D031548" xlink:to="loc_srt_ConsolidationItemsAxis_CD3CA73BAF9958BBB32E902463B0DA1D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_CD3CA73BAF9958BBB32E902463B0DA1D" xlink:to="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_882CC7BFD58659C992E7229A907346CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_CD3CA73BAF9958BBB32E902463B0DA1D" xlink:to="loc_srt_ConsolidationItemsDomain_882CC7BFD58659C992E7229A907346CE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_2A04A1CB4D2F5CDB88B4BF0FEEBF5186" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_882CC7BFD58659C992E7229A907346CE" xlink:to="loc_us-gaap_OperatingSegmentsMember_2A04A1CB4D2F5CDB88B4BF0FEEBF5186" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntersegmentEliminationMember" xlink:label="loc_us-gaap_IntersegmentEliminationMember_673A4C0E3B7E5FD4BB9F92ECF607C3C2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_882CC7BFD58659C992E7229A907346CE" xlink:to="loc_us-gaap_IntersegmentEliminationMember_673A4C0E3B7E5FD4BB9F92ECF607C3C2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_C66748FB53205AE69969D28A002A3051" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5B62C357676A52649FC3D55E1D031548" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_C66748FB53205AE69969D28A002A3051" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_C66748FB53205AE69969D28A002A3051" xlink:to="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_C66748FB53205AE69969D28A002A3051" xlink:to="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_39BBD55A5E755080B81F068692AC4D6E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:to="loc_mtrx_ElectricalInfrastructureMember_39BBD55A5E755080B81F068692AC4D6E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_6992CC9DB170505BBAA199F1BD13B07B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:to="loc_mtrx_OilGasAndChemicalMember_6992CC9DB170505BBAA199F1BD13B07B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_35EA13F75D175AE394F1E4D1E3023460" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:to="loc_mtrx_StorageSolutionsMember_35EA13F75D175AE394F1E4D1E3023460" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_B8FA8BC1D30C5308B79657DD96AB9015" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:to="loc_mtrx_IndustrialMember_B8FA8BC1D30C5308B79657DD96AB9015" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllOtherSegmentsMember" xlink:label="loc_us-gaap_AllOtherSegmentsMember_B0892AEDAABA50ECB94ADC06FD8D9138" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5545074ACAB7573EA0C476E9C62E6109" xlink:to="loc_us-gaap_AllOtherSegmentsMember_B0892AEDAABA50ECB94ADC06FD8D9138" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingInformationProfitLossAbstract" xlink:label="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5B745425DFC754229027EADEAE768EE0" xlink:to="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Grossrevenues" xlink:label="loc_mtrx_Grossrevenues_ACA38F058C345670AF78D4FE085693F4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_mtrx_Grossrevenues_ACA38F058C345670AF78D4FE085693F4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_63DAA494C8135DD2A9DCDE32047246F8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_Revenues_63DAA494C8135DD2A9DCDE32047246F8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_277B10AD2C625AFEA79AA7B6B9CF2C06" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_GrossProfit_277B10AD2C625AFEA79AA7B6B9CF2C06" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_4DDBE657AE195FBBBDFD778329E18905" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_OperatingIncomeLoss_4DDBE657AE195FBBBDFD778329E18905" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_F27B8AB130BE58C29A78DB1F878735EB" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_Assets_F27B8AB130BE58C29A78DB1F878735EB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9F80747D1C445BB788B8C7BC171DC535" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_9F80747D1C445BB788B8C7BC171DC535" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_5F9A89B7541B56DA872AD4B703D73550" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_21181A4A6162517E8B5914A70677F224" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_5F9A89B7541B56DA872AD4B703D73550" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationDetails1" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" xlink:label="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_0840686BA13CCC3CE486FA66AF8B228D" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:label="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_E5F4990E39222C132BA7FA66AF8B34BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_0840686BA13CCC3CE486FA66AF8B228D" xlink:to="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_E5F4990E39222C132BA7FA66AF8B34BB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_275875760087F93BD533FA66AF8B828E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_E5F4990E39222C132BA7FA66AF8B34BB" xlink:to="loc_srt_StatementGeographicalAxis_275875760087F93BD533FA66AF8B828E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_275875760087F93BD533FA66AF8B828E" xlink:to="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_275875760087F93BD533FA66AF8B828E" xlink:to="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_93454C06B9914D7BFC4DFA66AF8BA482" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417" xlink:to="loc_country_US_93454C06B9914D7BFC4DFA66AF8BA482" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_CA" xlink:label="loc_country_CA_7B13B05C5E19B9C9CD6EFA66AF8BA823" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417" xlink:to="loc_country_CA_7B13B05C5E19B9C9CD6EFA66AF8BA823" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_InternationalMember" xlink:label="loc_mtrx_InternationalMember_066CE3B565B346792C8CFA66AF8B1F24" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_2569FC9787A3B99EEDA6FA66AF8B2417" xlink:to="loc_mtrx_InternationalMember_066CE3B565B346792C8CFA66AF8B1F24" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract" xlink:label="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_44942383830AC27D3BDAFA66AF8BC0CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_0840686BA13CCC3CE486FA66AF8B228D" xlink:to="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_44942383830AC27D3BDAFA66AF8BC0CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_672C83207F1D45904B53FA66AF8B4EFA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_44942383830AC27D3BDAFA66AF8BC0CA" xlink:to="loc_us-gaap_Revenues_672C83207F1D45904B53FA66AF8B4EFA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncurrentAssets" xlink:label="loc_us-gaap_NoncurrentAssets_611CE77755363D8F2447FA66AF8B50BE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_44942383830AC27D3BDAFA66AF8BC0CA" xlink:to="loc_us-gaap_NoncurrentAssets_611CE77755363D8F2447FA66AF8B50BE" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_A2CD92FD40DAB0CF7F8DFD1C64FDE453" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_98B21CD5CCE0A320EB88FD1C64EE376C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_A2CD92FD40DAB0CF7F8DFD1C64FDE453" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_98B21CD5CCE0A320EB88FD1C64EE376C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_8C3F0C3855DFEBDCC036FD1C64EEA035" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_98B21CD5CCE0A320EB88FD1C64EE376C" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_8C3F0C3855DFEBDCC036FD1C64EEA035" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8C3F0C3855DFEBDCC036FD1C64EEA035" xlink:to="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8C3F0C3855DFEBDCC036FD1C64EEA035" xlink:to="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_2A13083EEB2B3BADEFB8FD1C64EF8C3F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:to="loc_mtrx_ElectricalInfrastructureMember_2A13083EEB2B3BADEFB8FD1C64EF8C3F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_13CE35BE48BD56D3A950FD1C64F47B33" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:to="loc_mtrx_OilGasAndChemicalMember_13CE35BE48BD56D3A950FD1C64F47B33" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_E7C6F1E853C58BF5A0A2FD1C64F43D22" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:to="loc_mtrx_StorageSolutionsMember_E7C6F1E853C58BF5A0A2FD1C64F43D22" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_ADC7D6E7A7C2230A7180FD1C64F4E2CC" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_B2704F29B53D60358EFBFD1C64EE86DD" xlink:to="loc_mtrx_IndustrialMember_ADC7D6E7A7C2230A7180FD1C64F4E2CC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MajorCustomersAxis" xlink:label="loc_srt_MajorCustomersAxis_DE8CD609C24085B63D65FD1C64F47049" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_98B21CD5CCE0A320EB88FD1C64EE376C" xlink:to="loc_srt_MajorCustomersAxis_DE8CD609C24085B63D65FD1C64F47049" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:label="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_DE8CD609C24085B63D65FD1C64F47049" xlink:to="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:label="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_DE8CD609C24085B63D65FD1C64F47049" xlink:to="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerOneMember" xlink:label="loc_mtrx_CustomerOneMember_A47F130A453BE6C333DCFD1C64F547EE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerOneMember_A47F130A453BE6C333DCFD1C64F547EE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerTwoMember" xlink:label="loc_mtrx_CustomerTwoMember_2CF7A1171CF77CAA54C7FD1C64F5A424" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerTwoMember_2CF7A1171CF77CAA54C7FD1C64F5A424" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerThreeMember" xlink:label="loc_mtrx_CustomerThreeMember_F8506C1E11E21F97A002FD1C64F56158" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerThreeMember_F8506C1E11E21F97A002FD1C64F56158" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerFourMember" xlink:label="loc_mtrx_CustomerFourMember_1ED9FF75F9ABB3850EAFFD1C64F6F701" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerFourMember_1ED9FF75F9ABB3850EAFFD1C64F6F701" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerFiveMemberMember" xlink:label="loc_mtrx_CustomerFiveMemberMember_9DCAC904844F3AC70F00FD1C64F6DCE5" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerFiveMemberMember_9DCAC904844F3AC70F00FD1C64F6DCE5" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerSixMember" xlink:label="loc_mtrx_CustomerSixMember_D9A645EA762DFFB879E0FD1C64F6E2F2" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerSixMember_D9A645EA762DFFB879E0FD1C64F6E2F2" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerSevenMember" xlink:label="loc_mtrx_CustomerSevenMember_9363990E9B80CC6E8F78FD1C64F696CC" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerSevenMember_9363990E9B80CC6E8F78FD1C64F696CC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerEightMember" xlink:label="loc_mtrx_CustomerEightMember_E3C635790BA9E677F3B1FD1C64F69BB6" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerEightMember_E3C635790BA9E677F3B1FD1C64F69BB6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerNineMember" xlink:label="loc_mtrx_CustomerNineMember_CB411D40D08F7B2E5DE4FD1C64F7FF30" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerNineMember_CB411D40D08F7B2E5DE4FD1C64F7FF30" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerTenMember" xlink:label="loc_mtrx_CustomerTenMember_4D81959AD9871FA152ACFD1C64F7CE24" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerTenMember_4D81959AD9871FA152ACFD1C64F7CE24" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_CustomerElevenMember" xlink:label="loc_mtrx_CustomerElevenMember_B03D11DD5CF3160EEDD8FD1C64F70883" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_CustomerElevenMember_B03D11DD5CF3160EEDD8FD1C64F70883" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_AnotherCustomerMember" xlink:label="loc_mtrx_AnotherCustomerMember_E064FC30E13A6EB3198BFD1C64FC83D3" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_639863BA0B694058788CFD1C64F40E20" xlink:to="loc_mtrx_AnotherCustomerMember_E064FC30E13A6EB3198BFD1C64FC83D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_214375D0D9A6E5B5B61DFD1C64FD7B91" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_A2CD92FD40DAB0CF7F8DFD1C64FDE453" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_214375D0D9A6E5B5B61DFD1C64FD7B91" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails1" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails2" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_3A6539312200574B81474611A1BDD62A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_888985BF27035C3E800D7E5094D88509" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_3A6539312200574B81474611A1BDD62A" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_888985BF27035C3E800D7E5094D88509" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_E892731A5A2650A0AA61D9713FBC62C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_888985BF27035C3E800D7E5094D88509" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_E892731A5A2650A0AA61D9713FBC62C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_E892731A5A2650A0AA61D9713FBC62C6" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_4432916A83FA5106B15ABA267F597417" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_E892731A5A2650A0AA61D9713FBC62C6" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_4432916A83FA5106B15ABA267F597417" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_RangeThreeMember" xlink:label="loc_mtrx_RangeThreeMember_B4DFFE7C0DD552FAA42E59A6BEE56EF0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_4432916A83FA5106B15ABA267F597417" xlink:to="loc_mtrx_RangeThreeMember_B4DFFE7C0DD552FAA42E59A6BEE56EF0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_RangeOneMember" xlink:label="loc_mtrx_RangeOneMember_57EE87E6A0FB5766AE7F6CBAA70248AC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_4432916A83FA5106B15ABA267F597417" xlink:to="loc_mtrx_RangeOneMember_57EE87E6A0FB5766AE7F6CBAA70248AC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_RangeTwoMember" xlink:label="loc_mtrx_RangeTwoMember_A5688C426D505D1FB2B125C4FFE7CB64" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_4432916A83FA5106B15ABA267F597417" xlink:to="loc_mtrx_RangeTwoMember_A5688C426D505D1FB2B125C4FFE7CB64" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract" xlink:label="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_3A6539312200574B81474611A1BDD62A" xlink:to="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit_D3AA9E07E02D5AAA9260649AE4F64C54" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit_D3AA9E07E02D5AAA9260649AE4F64C54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit_7514471505D856B59F3276C2BC51BE12" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit_7514471505D856B59F3276C2BC51BE12" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_C3E91EDEA79356EB90ADA08ED7103CE5" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_C3E91EDEA79356EB90ADA08ED7103CE5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1" xlink:label="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1_D5C94AF69C04599E926CEC10607709D6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1_D5C94AF69C04599E926CEC10607709D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_20A150348D3A5870BA4930D9229C72E0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_20A150348D3A5870BA4930D9229C72E0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber_F0DBC11CA40F5161BAB10D53FDF9020A" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber_F0DBC11CA40F5161BAB10D53FDF9020A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice_91106BD2E1A850D9A0EADB1FFC53C891" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice_91106BD2E1A850D9A0EADB1FFC53C891" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1_0E8B2134F54052D692A7F8B10D282C15" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_2308EA4509CB5CE6B3FB14A5CC2B738E" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1_0E8B2134F54052D692A7F8B10D282C15" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails3" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_F2398B66C2E436A837E6FDE5B7ABC599" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:to="loc_us-gaap_PlanNameAxis_F2398B66C2E436A837E6FDE5B7ABC599" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_F2398B66C2E436A837E6FDE5B7ABC599" xlink:to="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_F2398B66C2E436A837E6FDE5B7ABC599" xlink:to="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember_C8BF0834A4B8FCC9D510FDE5B7AC4AD9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A" xlink:to="loc_mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember_C8BF0834A4B8FCC9D510FDE5B7AC4AD9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember_82D713A228D4BAC3A3DDFDE5B7AC554A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A" xlink:to="loc_mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember_82D713A228D4BAC3A3DDFDE5B7AC554A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember_A1AAC40B39D3E5E9EE40FDE5B7ACE782" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B66186E5B1A858615819FDE5B7AC1D8A" xlink:to="loc_mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember_A1AAC40B39D3E5E9EE40FDE5B7ACE782" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_B569879DE07615085EC2FDE5B7AD9820" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:to="loc_us-gaap_AwardTypeAxis_B569879DE07615085EC2FDE5B7AD9820" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_B569879DE07615085EC2FDE5B7AD9820" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_B569879DE07615085EC2FDE5B7AD9820" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MarketBasedAwardsMember" xlink:label="loc_mtrx_MarketBasedAwardsMember_7967550781A071550641FDE5B7AD5A74" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_MarketBasedAwardsMember_7967550781A071550641FDE5B7AD5A74" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2016Member" xlink:label="loc_mtrx_Vestin2016Member_6BBAD558931221ACE3E9FDE5B7AD96C0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2016Member_6BBAD558931221ACE3E9FDE5B7AD96C0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2017Member" xlink:label="loc_mtrx_Vestin2017Member_77A82E1D9409BE010519FDE5B7AE2C7D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2017Member_77A82E1D9409BE010519FDE5B7AE2C7D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2018Member" xlink:label="loc_mtrx_Vestin2018Member_4D5652A819CEE1729423FDE5B7AE5242" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2018Member_4D5652A819CEE1729423FDE5B7AE5242" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2019Member" xlink:label="loc_mtrx_Vestin2019Member_630AB9F580CC16AC8F97FDE5B7AE5B20" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2019Member_630AB9F580CC16AC8F97FDE5B7AE5B20" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2020Member" xlink:label="loc_mtrx_Vestin2020Member_5B523C9F4D686920F301FDE5B7AE5B97" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2020Member_5B523C9F4D686920F301FDE5B7AE5B97" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestin2022Member" xlink:label="loc_mtrx_Vestin2022Member_03ED22A5DFB19844380CFDE5B7AE0861" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_45AFEDE130543FBB48A4FDE5B7AD050A" xlink:to="loc_mtrx_Vestin2022Member_03ED22A5DFB19844380CFDE5B7AE0861" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_9F6CE1C2C5E4D876BD91FDE5B7AE77C5" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_9F6CE1C2C5E4D876BD91FDE5B7AE77C5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain" xlink:label="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_9F6CE1C2C5E4D876BD91FDE5B7AE77C5" xlink:to="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain" xlink:label="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_9F6CE1C2C5E4D876BD91FDE5B7AE77C5" xlink:to="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_EmployeeAwardMember" xlink:label="loc_mtrx_EmployeeAwardMember_8A7EAD5005BE8D960DC1FDE5B7AFF8DB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D" xlink:to="loc_mtrx_EmployeeAwardMember_8A7EAD5005BE8D960DC1FDE5B7AFF8DB" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_DirectorAwardsMember" xlink:label="loc_mtrx_DirectorAwardsMember_F0ABA5A2CBC46DA22735FDF1B4C41E9E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_F2BF30AC65F483BAC3EDFDE5B7AFDD4D" xlink:to="loc_mtrx_DirectorAwardsMember_F0ABA5A2CBC46DA22735FDF1B4C41E9E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_3D51D57AAE1D848EF471FDE5B7AFD95F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_29FC941C465BB410ACDCFDE5B7AB934A" xlink:to="loc_srt_RangeAxis_3D51D57AAE1D848EF471FDE5B7AFD95F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_3D51D57AAE1D848EF471FDE5B7AFD95F" xlink:to="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_3D51D57AAE1D848EF471FDE5B7AFD95F" xlink:to="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_093A1C0971A5250ED12DFDE5B7B0D637" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68" xlink:to="loc_srt_MinimumMember_093A1C0971A5250ED12DFDE5B7B0D637" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_9A018988E8CCDC155328FDE5B7B09EBA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_A1BD5505E44ACBCDBC74FDE5B7AF4F68" xlink:to="loc_srt_MaximumMember_9A018988E8CCDC155328FDE5B7B09EBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_B9AEC8398C293E3F2606FDE5B7B05F3C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensation_B9AEC8398C293E3F2606FDE5B7B05F3C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_245759619A8978E04B63FDE5B7B181E9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_245759619A8978E04B63FDE5B7B181E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_053E161AAF28695ED79CFDE5B7B10683" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_053E161AAF28695ED79CFDE5B7B10683" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitAmount" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitAmount_88BDCE8A29440E5F477CFDE5B7B14E51" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitAmount_88BDCE8A29440E5F477CFDE5B7B14E51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_B8C41824B7F5C016BC6EFDE5B7B1FCB5" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_B8C41824B7F5C016BC6EFDE5B7B1FCB5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_5DCA29D91B8785380A07FDE5B7B1C1F1" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_5DCA29D91B8785380A07FDE5B7B1C1F1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_DA9B1F0BCEE1772E4DC0FDE5B7B261FB" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_DA9B1F0BCEE1772E4DC0FDE5B7B261FB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_071372EF19EF0E5FA92CFDE5B7B23302" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_071372EF19EF0E5FA92CFDE5B7B23302" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_DFF640640E2739CA433BFDE5B7B2994C" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_DFF640640E2739CA433BFDE5B7B2994C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting_9EFD4032AF677411F088FDE5B7B2D15E" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting_9EFD4032AF677411F088FDE5B7B2D15E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_Vestingperiodretirementeligibleemployees" xlink:label="loc_mtrx_Vestingperiodretirementeligibleemployees_D015896DBCB6F43311C4FDE5B7B2C2B9" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_Vestingperiodretirementeligibleemployees_D015896DBCB6F43311C4FDE5B7B2C2B9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards_AA5D838CFF84500274A6FDE5B7B3D6D7" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards_AA5D838CFF84500274A6FDE5B7B3D6D7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards_AFE66F8ED7A41D45429CFDE5B7B34831" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards_AFE66F8ED7A41D45429CFDE5B7B34831" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PayoutAsPercentageOfOriginalAwardMinimum" xlink:label="loc_mtrx_PayoutAsPercentageOfOriginalAwardMinimum_6F89FD328C7F9BFB33F6FDE5B7B3559E" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_PayoutAsPercentageOfOriginalAwardMinimum_6F89FD328C7F9BFB33F6FDE5B7B3559E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_PayoutAsPercentageOfOriginalAwardMaximum" xlink:label="loc_mtrx_PayoutAsPercentageOfOriginalAwardMaximum_443E309902DC250BBC5AFDE5B7B3ADED" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_PayoutAsPercentageOfOriginalAwardMaximum_443E309902DC250BBC5AFDE5B7B3ADED" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares" xlink:label="loc_mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares_AEEB627F6E950B716598FDE5B7B33A0F" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares_AEEB627F6E950B716598FDE5B7B33A0F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod_E0C843C9592D401534BCFDE5B7B355CA" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod_E0C843C9592D401534BCFDE5B7B355CA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue_67BE4A750ABC8B05A33FFDE5B7B4FA95" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue_67BE4A750ABC8B05A33FFDE5B7B4FA95" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased_E26D21A89D364FDCE463FDE5B7B4E2CD" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased_E26D21A89D364FDCE463FDE5B7B4E2CD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue_E2314221D31F969DB25CFDE5B7B42FB0" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue_E2314221D31F969DB25CFDE5B7B42FB0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsed" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsed_8C9547D8B8CFEED40456FDE5B7B4EF22" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsed_8C9547D8B8CFEED40456FDE5B7B4EF22" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed_370F45E39E578E313AA5FDE5B7B49956" xlink:type="locator" />
    <link:definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_CBF625B5397AC81DE722FDE5B7B09118" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed_370F45E39E578E313AA5FDE5B7B49956" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockBasedCompensationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockholdersEquity" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/StockholdersEquityDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityClassOfTreasuryStockLineItems" xlink:label="loc_us-gaap_EquityClassOfTreasuryStockLineItems_4DF50C09B48114629ACDF9A4EF5C0147" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ClassOfTreasuryStockTable" xlink:label="loc_us-gaap_ClassOfTreasuryStockTable_2A6EB47FF830CBC9AFA1F9A4EF5C8F1F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_4DF50C09B48114629ACDF9A4EF5C0147" xlink:to="loc_us-gaap_ClassOfTreasuryStockTable_2A6EB47FF830CBC9AFA1F9A4EF5C8F1F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_A43AC56AAF57FF68E2FAF9A4EF5CF705" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_2A6EB47FF830CBC9AFA1F9A4EF5C8F1F" xlink:to="loc_us-gaap_StatementClassOfStockAxis_A43AC56AAF57FF68E2FAF9A4EF5CF705" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_3DC114BF9A208CBBB665F9A4EF5C66B4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_A43AC56AAF57FF68E2FAF9A4EF5CF705" xlink:to="loc_us-gaap_ClassOfStockDomain_3DC114BF9A208CBBB665F9A4EF5C66B4_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_3DC114BF9A208CBBB665F9A4EF5C66B4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_A43AC56AAF57FF68E2FAF9A4EF5CF705" xlink:to="loc_us-gaap_ClassOfStockDomain_3DC114BF9A208CBBB665F9A4EF5C66B4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareRepurchaseProgramAxis" xlink:label="loc_us-gaap_ShareRepurchaseProgramAxis_ED1B7E0EB97B21CC40B8F9A4EF5C4DBF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_2A6EB47FF830CBC9AFA1F9A4EF5C8F1F" xlink:to="loc_us-gaap_ShareRepurchaseProgramAxis_ED1B7E0EB97B21CC40B8F9A4EF5C4DBF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_246B2B812FD6C5B2B763F9A4EF5C9BBF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_ED1B7E0EB97B21CC40B8F9A4EF5C4DBF" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_246B2B812FD6C5B2B763F9A4EF5C9BBF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_246B2B812FD6C5B2B763F9A4EF5C9BBF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_ED1B7E0EB97B21CC40B8F9A4EF5C4DBF" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_246B2B812FD6C5B2B763F9A4EF5C9BBF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockRepurchaseProgramExpirationDate" xlink:label="loc_us-gaap_StockRepurchaseProgramExpirationDate_693DA0CE39EAE057A41BF9A4EF5CAD9C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_4DF50C09B48114629ACDF9A4EF5C0147" xlink:to="loc_us-gaap_StockRepurchaseProgramExpirationDate_693DA0CE39EAE057A41BF9A4EF5CAD9C" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesDetailsTextual" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_77FFD6BACC90DF2BD29AFA75252A6FD6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_77FFD6BACC90DF2BD29AFA75252A6FD6" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_F5641D571281520B5D43FA75252A031D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_77FFD6BACC90DF2BD29AFA75252A6FD6" xlink:to="loc_srt_StatementGeographicalAxis_F5641D571281520B5D43FA75252A031D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_8DFAEE2A20F5262F18E3FA75252A9D7D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_F5641D571281520B5D43FA75252A031D" xlink:to="loc_srt_SegmentGeographicalDomain_8DFAEE2A20F5262F18E3FA75252A9D7D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_8DFAEE2A20F5262F18E3FA75252A9D7D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_F5641D571281520B5D43FA75252A031D" xlink:to="loc_srt_SegmentGeographicalDomain_8DFAEE2A20F5262F18E3FA75252A9D7D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20190630.xsd#mtrx_InternationalMember" xlink:label="loc_mtrx_InternationalMember_DB43302E47588B404FABFA75252A1408" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8DFAEE2A20F5262F18E3FA75252A9D7D" xlink:to="loc_mtrx_InternationalMember_DB43302E47588B404FABFA75252A1408" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_27416788998EF35A2632FA75252AF1F4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_77FFD6BACC90DF2BD29AFA75252A6FD6" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_27416788998EF35A2632FA75252AF1F4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_27416788998EF35A2632FA75252AF1F4" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_27416788998EF35A2632FA75252AF1F4" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BuildingMember" xlink:label="loc_us-gaap_BuildingMember_BEB63F097A33B8CC9A3FFA75253A92A2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:to="loc_us-gaap_BuildingMember_BEB63F097A33B8CC9A3FFA75253A92A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquipmentMember" xlink:label="loc_us-gaap_EquipmentMember_4CC4D007B7274FE743D9FA75253A79D9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:to="loc_us-gaap_EquipmentMember_4CC4D007B7274FE743D9FA75253A79D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransportationEquipmentMember" xlink:label="loc_us-gaap_TransportationEquipmentMember_758130AD8C8DB6CAB3F9FA75253A34F5" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:to="loc_us-gaap_TransportationEquipmentMember_758130AD8C8DB6CAB3F9FA75253A34F5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FurnitureAndFixturesMember" xlink:label="loc_us-gaap_FurnitureAndFixturesMember_BF49BF4B980CB100E16FFA75253A7D4B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_E6856A2ACAC24BDF62D1FA75252AF24A" xlink:to="loc_us-gaap_FurnitureAndFixturesMember_BF49BF4B980CB100E16FFA75253A7D4B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_5A8DF150CC6FA06BA23CFA75253AE17F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_77FFD6BACC90DF2BD29AFA75252A6FD6" xlink:to="loc_srt_RangeAxis_5A8DF150CC6FA06BA23CFA75253AE17F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_5A8DF150CC6FA06BA23CFA75253AE17F" xlink:to="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_5A8DF150CC6FA06BA23CFA75253AE17F" xlink:to="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_F5F168DAC9113338BDE4FA75253AA71E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730" xlink:to="loc_srt_MinimumMember_F5F168DAC9113338BDE4FA75253AA71E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_AFECC374896A5C30E594FA75253AB751" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_DE5C1E008EAD44357797FA75253AA730" xlink:to="loc_srt_MaximumMember_AFECC374896A5C30E594FA75253AB751" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_0A7F7E91E241F5BD8F97FA75253A3C05" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_0A7F7E91E241F5BD8F97FA75253A3C05" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_7A94C8C70BAE38FAF4FBFA75253A5C55" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_7A94C8C70BAE38FAF4FBFA75253A5C55" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalents" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_196F9C0D1B16643D47AAFA75253A64D9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_196F9C0D1B16643D47AAFA75253A64D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Cash" xlink:label="loc_us-gaap_Cash_C3BFD3EA6A8B3ADAD280FA75253AE7C4" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_3548782191F6DC623217FA75253AF7D6" xlink:to="loc_us-gaap_Cash_C3BFD3EA6A8B3ADAD280FA75253AE7C4" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesSummaryOfSignificantAccountingPoliciesImpactOfNewAccountingPronouncementDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_3BECF41941B28A19EA2FF8359B03C0E6" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_3BECF41941B28A19EA2FF8359B03C0E6" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_F891594487AA3D21CA2EF8359B020D5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_F891594487AA3D21CA2EF8359B020D5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_7517B882A91592426CB3F8359B02B1B3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_F891594487AA3D21CA2EF8359B020D5B" xlink:to="loc_us-gaap_TypeOfAdoptionMember_7517B882A91592426CB3F8359B02B1B3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_7517B882A91592426CB3F8359B02B1B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_F891594487AA3D21CA2EF8359B020D5B" xlink:to="loc_us-gaap_TypeOfAdoptionMember_7517B882A91592426CB3F8359B02B1B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis" xlink:label="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_CDC96DA8093DE58C7FDFF8359B029E0A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:to="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_CDC96DA8093DE58C7FDFF8359B029E0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ChangeInAccountingPrincipleMember" xlink:label="loc_us-gaap_ChangeInAccountingPrincipleMember_7F7A2438991C0539EDB7F8359B039B8B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_CDC96DA8093DE58C7FDFF8359B029E0A" xlink:to="loc_us-gaap_ChangeInAccountingPrincipleMember_7F7A2438991C0539EDB7F8359B039B8B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ChangeInAccountingPrincipleMember" xlink:label="loc_us-gaap_ChangeInAccountingPrincipleMember_7F7A2438991C0539EDB7F8359B039B8B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_CDC96DA8093DE58C7FDFF8359B029E0A" xlink:to="loc_us-gaap_ChangeInAccountingPrincipleMember_7F7A2438991C0539EDB7F8359B039B8B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_1FE89FCDDF20B1538EBAF8359B038684" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:to="loc_us-gaap_StatementScenarioAxis_1FE89FCDDF20B1538EBAF8359B038684" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_0991B6D2E12FEBA345B6F8359B03BE18_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_1FE89FCDDF20B1538EBAF8359B038684" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_0991B6D2E12FEBA345B6F8359B03BE18_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_0991B6D2E12FEBA345B6F8359B03BE18" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_1FE89FCDDF20B1538EBAF8359B038684" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_0991B6D2E12FEBA345B6F8359B03BE18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_B450FB0E9B001E637F97F85A5A6502A8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_AFBCC58AFD8A390823FDF8359B01E576" xlink:to="loc_srt_RangeAxis_B450FB0E9B001E637F97F85A5A6502A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_B450FB0E9B001E637F97F85A5A6502A8" xlink:to="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_B450FB0E9B001E637F97F85A5A6502A8" xlink:to="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_E8F6987C92A769A0AEA5F85AD3AAC2D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C" xlink:to="loc_srt_MinimumMember_E8F6987C92A769A0AEA5F85AD3AAC2D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_8B3E7754E00ACC071E63F85B44FFF3C4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_58CFDB9349F2EEA53225F85A5A65224C" xlink:to="loc_srt_MaximumMember_8B3E7754E00ACC071E63F85B44FFF3C4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleEffectOfAdoptionQuantification" xlink:label="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleEffectOfAdoptionQuantification_03BF237B97B85B67E80DF8359B03B100" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_3BECF41941B28A19EA2FF8359B03C0E6" xlink:to="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleEffectOfAdoptionQuantification_03BF237B97B85B67E80DF8359B03B100" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccounts" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccountsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ValuationAndQualifyingAccountsDisclosureLineItems" xlink:label="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_E341749202EE51F1862E8F1C777B2C9F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ValuationAndQualifyingAccountsDisclosureTable" xlink:label="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_08E15D0D19A15082920186DDB23E6912" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_E341749202EE51F1862E8F1C777B2C9F" xlink:to="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_08E15D0D19A15082920186DDB23E6912" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_79C8B2ED8D16534286A092A5C84F530F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_08E15D0D19A15082920186DDB23E6912" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_79C8B2ED8D16534286A092A5C84F530F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_79C8B2ED8D16534286A092A5C84F530F" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38_9ACD05F9575A5D53A492A1FAD3E08C21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_BE90D02FE1E45562BD92C27F12A77732" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_79C8B2ED8D16534286A092A5C84F530F" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_BE90D02FE1E45562BD92C27F12A77732" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllowanceForCreditLossMember" xlink:label="loc_us-gaap_AllowanceForCreditLossMember_6C262DBECA015D0F85E908BA92771D89" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_BE90D02FE1E45562BD92C27F12A77732" xlink:to="loc_us-gaap_AllowanceForCreditLossMember_6C262DBECA015D0F85E908BA92771D89" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember" xlink:label="loc_us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember_3E0CF69535AA59CF902972666EE52409" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_BE90D02FE1E45562BD92C27F12A77732" xlink:to="loc_us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember_3E0CF69535AA59CF902972666EE52409" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MovementInValuationAllowancesAndReservesRollForward" xlink:label="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_E341749202EE51F1862E8F1C777B2C9F" xlink:to="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesBalance" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesBalance_3800AD48ACFA5E399CB816289B250ECA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesBalance_3800AD48ACFA5E399CB816289B250ECA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense_7F261632E021552B89F296133B035E0A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense_7F261632E021552B89F296133B035E0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts_8526171E7BA250B4A7B30CE57361DEE1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts_8526171E7BA250B4A7B30CE57361DEE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDeductions" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDeductions_31BDB18561815DA3887D69E20B7ABE7D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_C1F6F49B379B52B28C0CC9D6ECE9A6FA" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDeductions_31BDB18561815DA3887D69E20B7ABE7D" xlink:type="arc" />
  </link:definitionLink>
</link:linkbase>
