<?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/Acquisitions" xlink:href="mtrx-20180630.xsd#Acquisitions" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsDetails" xlink:href="mtrx-20180630.xsd#AcquisitionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsDetailsTextual" xlink:href="mtrx-20180630.xsd#AcquisitionsDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/AcquisitionsTables" xlink:href="mtrx-20180630.xsd#AcquisitionsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheets" xlink:href="mtrx-20180630.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="mtrx-20180630.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquity" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfChangesInStockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfComprehensiveIncomeParentheticals" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfComprehensiveIncomeParentheticals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ConsolidatedStatementsOfIncome" xlink:href="mtrx-20180630.xsd#ConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/Contingencies" xlink:href="mtrx-20180630.xsd#Contingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ContingenciesDetailsTextual" xlink:href="mtrx-20180630.xsd#ContingenciesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CustomerContracts" xlink:href="mtrx-20180630.xsd#CustomerContracts" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CustomerContractsDetails" xlink:href="mtrx-20180630.xsd#CustomerContractsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CustomerContractsDetailsTextual" xlink:href="mtrx-20180630.xsd#CustomerContractsDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CustomerContractsTables" xlink:href="mtrx-20180630.xsd#CustomerContractsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/Debt" xlink:href="mtrx-20180630.xsd#Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtDetails" xlink:href="mtrx-20180630.xsd#DebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtDetailsTextual" xlink:href="mtrx-20180630.xsd#DebtDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtTables" xlink:href="mtrx-20180630.xsd#DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DocumentAndEntityInformation" xlink:href="mtrx-20180630.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShare" xlink:href="mtrx-20180630.xsd#EarningsPerCommonShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails" xlink:href="mtrx-20180630.xsd#EarningsPerCommonShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareDetails1" xlink:href="mtrx-20180630.xsd#EarningsPerCommonShareDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsPerCommonShareTables" xlink:href="mtrx-20180630.xsd#EarningsPerCommonShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlans" xlink:href="mtrx-20180630.xsd#EmployeeBenefitPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetails" xlink:href="mtrx-20180630.xsd#EmployeeBenefitPlansDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansDetailsTextual" xlink:href="mtrx-20180630.xsd#EmployeeBenefitPlansDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EmployeeBenefitPlansTables" xlink:href="mtrx-20180630.xsd#EmployeeBenefitPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssets" xlink:href="mtrx-20180630.xsd#GoodwillAndOtherIntangibleAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails" xlink:href="mtrx-20180630.xsd#GoodwillAndOtherIntangibleAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetails1" xlink:href="mtrx-20180630.xsd#GoodwillAndOtherIntangibleAssetsDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsDetailsTextual" xlink:href="mtrx-20180630.xsd#GoodwillAndOtherIntangibleAssetsDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/GoodwillAndOtherIntangibleAssetsTables" xlink:href="mtrx-20180630.xsd#GoodwillAndOtherIntangibleAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxes" xlink:href="mtrx-20180630.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails1" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails2" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetails2" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails3" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetails3" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails4" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetails4" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetailsTextual" xlink:href="mtrx-20180630.xsd#IncomeTaxesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails5" xlink:href="mtrx-20180630.xsd#IncomeTaxesIncomeTaxesDetails5" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesIncomeTaxesDetails6" xlink:href="mtrx-20180630.xsd#IncomeTaxesIncomeTaxesDetails6" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesTables" xlink:href="mtrx-20180630.xsd#IncomeTaxesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/OperatingLeases" xlink:href="mtrx-20180630.xsd#OperatingLeases" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/OperatingLeasesDetailsTextual" xlink:href="mtrx-20180630.xsd#OperatingLeasesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:href="mtrx-20180630.xsd#QuarterlyFinancialDataUnauditedDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedQuarterlyFinancialDataUnaudited" xlink:href="mtrx-20180630.xsd#QuarterlyFinancialDataUnauditedQuarterlyFinancialDataUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/QuarterlyFinancialDataUnauditedTables" xlink:href="mtrx-20180630.xsd#QuarterlyFinancialDataUnauditedTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformation" xlink:href="mtrx-20180630.xsd#SegmentInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:href="mtrx-20180630.xsd#SegmentInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails1" xlink:href="mtrx-20180630.xsd#SegmentInformationDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetailsTextual" xlink:href="mtrx-20180630.xsd#SegmentInformationDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationTables" xlink:href="mtrx-20180630.xsd#SegmentInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensation" xlink:href="mtrx-20180630.xsd#StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails" xlink:href="mtrx-20180630.xsd#StockBasedCompensationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails1" xlink:href="mtrx-20180630.xsd#StockBasedCompensationDetails1" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails2" xlink:href="mtrx-20180630.xsd#StockBasedCompensationDetails2" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetails3" xlink:href="mtrx-20180630.xsd#StockBasedCompensationDetails3" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationDetailsTextual" xlink:href="mtrx-20180630.xsd#StockBasedCompensationDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockBasedCompensationTables" xlink:href="mtrx-20180630.xsd#StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockholdersEquity" xlink:href="mtrx-20180630.xsd#StockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/StockholdersEquityDetailsTextual" xlink:href="mtrx-20180630.xsd#StockholdersEquityDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPolicies" xlink:href="mtrx-20180630.xsd#SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesDetailsTextual" xlink:href="mtrx-20180630.xsd#SummaryOfSignificantAccountingPoliciesDetailsTextual" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:href="mtrx-20180630.xsd#SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SummaryOfSignificantAccountingPoliciesSummaryOfSignificantAccountingPoliciesImpactOfNewAccountingPronouncementDetails" xlink:href="mtrx-20180630.xsd#SummaryOfSignificantAccountingPoliciesSummaryOfSignificantAccountingPoliciesImpactOfNewAccountingPronouncementDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccounts" xlink:href="mtrx-20180630.xsd#ValuationAndQualifyingAccounts" xlink:type="simple" />
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/ValuationAndQualifyingAccountsDetails" xlink:href="mtrx-20180630.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/Acquisitions" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsDetails" 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_9521A584EB3805F48A54C5725A3AAF11" 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_A15B16E532A624BA0D0CC5725A386197" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A15B16E532A624BA0D0CC5725A386197" 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_68ABDDB76E09AE335A3BC5725A38B90E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A15B16E532A624BA0D0CC5725A386197" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_68ABDDB76E09AE335A3BC5725A38B90E" 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_C9B0CE61C7F1E69EDF20C5725A391F69_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_68ABDDB76E09AE335A3BC5725A38B90E" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69_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_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_68ABDDB76E09AE335A3BC5725A38B90E" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_F3F04405C018F4AB291AC5725A397631" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:to="loc_mtrx_HoustonInterestsLLCMember_F3F04405C018F4AB291AC5725A397631" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_44B7C5392CC4236797BEC5725A39C127" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_44B7C5392CC4236797BEC5725A39C127" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HDBInc.Member" xlink:label="loc_mtrx_HDBInc.Member_3B12E67CAC5D04CFA869C5725A398170" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:to="loc_mtrx_HDBInc.Member_3B12E67CAC5D04CFA869C5725A398170" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_KvaernerNorthAmericanConstructionMember" xlink:label="loc_mtrx_KvaernerNorthAmericanConstructionMember_C01506D5D51680EFA9ACC5725A3A22D5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:to="loc_mtrx_KvaernerNorthAmericanConstructionMember_C01506D5D51680EFA9ACC5725A3A22D5" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PelichemIndustrialCleaningServicesLlcMember" xlink:label="loc_mtrx_PelichemIndustrialCleaningServicesLlcMember_487EC985F5818A435507C5725A3AC7EC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_C9B0CE61C7F1E69EDF20C5725A391F69" xlink:to="loc_mtrx_PelichemIndustrialCleaningServicesLlcMember_487EC985F5818A435507C5725A3AC7EC" 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_E8A212E05B83FA29A461C5725A3A2ADF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_E8A212E05B83FA29A461C5725A3A2ADF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Cashpaidforequityinterest" xlink:label="loc_mtrx_Cashpaidforequityinterest_67C579336ECC1DCC6509C5725A3A7BBA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_Cashpaidforequityinterest_67C579336ECC1DCC6509C5725A3A7BBA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement" xlink:label="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_0A310030394914DFF51FC5725A3BDE37" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_0A310030394914DFF51FC5725A3BDE37" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Cashconsiderationpaid" xlink:label="loc_mtrx_Cashconsiderationpaid_03CBC7DF31762C178173C5725A3B71E1" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_Cashconsiderationpaid_03CBC7DF31762C178173C5725A3B71E1" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Accruedworkingcapitaladjustment" xlink:label="loc_mtrx_Accruedworkingcapitaladjustment_A6F8773401FCD0E301FEC5725A3B87B4" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_Accruedworkingcapitaladjustment_A6F8773401FCD0E301FEC5725A3B87B4" 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_A35AC0B87938C0374B06C5725A3B29C2" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables_A35AC0B87938C0374B06C5725A3B29C2" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts" xlink:label="loc_mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts_A3BC2FD744CBD9E9C98DC5725A3CC78B" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_Costsandestimatedearningsinexcessofbillingsonuncompletedcontracts_A3BC2FD744CBD9E9C98DC5725A3CC78B" 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_B9743A80B0A7BDEB35FCC5725A3C6CE9" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets_B9743A80B0A7BDEB35FCC5725A3C6CE9" 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_9752C900EFF37C639DD1C5725A3C6296" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_9752C900EFF37C639DD1C5725A3C6296" 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_B3BC42384E23D0DCEDE8C5725A3C59D5" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_B3BC42384E23D0DCEDE8C5725A3C59D5" 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_36D5CC80EFE52FF02FB9C5725A3CC4AA" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_Goodwill_36D5CC80EFE52FF02FB9C5725A3CC4AA" 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_3220A5AB52B50E92F5A4C5725A3C5A54" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_3220A5AB52B50E92F5A4C5725A3C5A54" 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_6770FCA55AF2DA69B1C2C5725A3D9CAE" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_6770FCA55AF2DA69B1C2C5725A3D9CAE" 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_1E57986A4F9F2D812C5FC5725A3D17E9" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_1E57986A4F9F2D812C5FC5725A3D17E9" 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_F8EC44CD3342C8B0F54DC5725A3DFC4F" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAssets_F8EC44CD3342C8B0F54DC5725A3DFC4F" 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_A3E9FC6C78A886EB37E3C5725A3D8DB9" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_A3E9FC6C78A886EB37E3C5725A3D8DB9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings" xlink:label="loc_mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings_B2970A5D565F59CE2232C5725A3DF6CC" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_mtrx_Billingsonuncompletedcontractsinexcessofcostsandestimatedearnings_B2970A5D565F59CE2232C5725A3DF6CC" 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_A85B38233EB5A441AF50C5725A3EF2B4" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_A85B38233EB5A441AF50C5725A3EF2B4" 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_8A1A2CD89F499A46C0E9C5725A3EAE85" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_8A1A2CD89F499A46C0E9C5725A3EAE85" 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_810C43406AFDE2BE0458C5725A3E95F1" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_810C43406AFDE2BE0458C5725A3E95F1" 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_7A5CE32B257E524D4C74C5725A3E78B5" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt_7A5CE32B257E524D4C74C5725A3E78B5" 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_1B756923EAE6F71CAF10C5725A3EABBA" xlink:type="locator" />
    <link:definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_1B756923EAE6F71CAF10C5725A3EABBA" 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_D7AEDCE1EE6E05166AEDC5725A3E3698" xlink:type="locator" />
    <link:definitionArc order="23" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionOfLessThan100PercentNoncontrollingInterestFairValue_D7AEDCE1EE6E05166AEDC5725A3E3698" 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_1B065EF4DF7193654661C5725A3F7149" xlink:type="locator" />
    <link:definitionArc order="24" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_1B065EF4DF7193654661C5725A3F7149" 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_44FD509CFDA4BFAFADF5C5725A3F16B5" xlink:type="locator" />
    <link:definitionArc order="25" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_44FD509CFDA4BFAFADF5C5725A3F16B5" 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_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:type="locator" />
    <link:definitionArc order="26" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9521A584EB3805F48A54C5725A3AAF11" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" 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_B28AE9062358C1EECBDBC5725A3F95CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_us-gaap_BusinessAcquisitionsProFormaRevenue_B28AE9062358C1EECBDBC5725A3F95CE" 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_80889C4ECE9B880E2EBFC5725A3F5BF3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss_80889C4ECE9B880E2EBFC5725A3F5BF3" 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_029D44D84CEFA3AD7BA7C5725A40DBAA" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareBasic_029D44D84CEFA3AD7BA7C5725A40DBAA" 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_D04917D4E0734ED0A881C5725A40FC53" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaEarningsPerShareDiluted_D04917D4E0734ED0A881C5725A40FC53" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Proformaacquisitioncosts" xlink:label="loc_mtrx_Proformaacquisitioncosts_DF4E622FB5AC2D72666DC5725A45E2E9" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_mtrx_Proformaacquisitioncosts_DF4E622FB5AC2D72666DC5725A45E2E9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Proformaacquisitioncostsamortizedovertime" xlink:label="loc_mtrx_Proformaacquisitioncostsamortizedovertime_A920FBC21B54C0F83954C5725A454CF7" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_mtrx_Proformaacquisitioncostsamortizedovertime_A920FBC21B54C0F83954C5725A454CF7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Proformainterestexpense" xlink:label="loc_mtrx_Proformainterestexpense_F9CA173D59A7AD7E9DCAC5725A460C6C" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_mtrx_Proformainterestexpense_F9CA173D59A7AD7E9DCAC5725A460C6C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Proformadepreciationandamortizationexpense" xlink:label="loc_mtrx_Proformadepreciationandamortizationexpense_904F95908C8EC3147CECC5725A46A1BC" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_mtrx_Proformadepreciationandamortizationexpense_904F95908C8EC3147CECC5725A46A1BC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Proformaincometaxexpense" xlink:label="loc_mtrx_Proformaincometaxexpense_53B750900EC27062C81FC5725A46ADAF" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionProFormaInformationAbstract_B29C11EC3B41D01F26DDC5725A3F2D9B" xlink:to="loc_mtrx_Proformaincometaxexpense_53B750900EC27062C81FC5725A46ADAF" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsDetailsTextual" 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_2FC58D4EB8230C31039AC571AE33E7DD" 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_04D9B294BB9047B001AFC571AE300592" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_04D9B294BB9047B001AFC571AE300592" 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_SubsequentEventTypeAxis" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_740308B16D3CB3996406C5771D085C91" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_04D9B294BB9047B001AFC571AE300592" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_740308B16D3CB3996406C5771D085C91" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_E43CED8D3CDBD6209934C5771F08A43B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_740308B16D3CB3996406C5771D085C91" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_E43CED8D3CDBD6209934C5771F08A43B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_E43CED8D3CDBD6209934C5771F08A43B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_740308B16D3CB3996406C5771D085C91" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_E43CED8D3CDBD6209934C5771F08A43B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventMember" xlink:label="loc_us-gaap_SubsequentEventMember_595A9FC18F8629E447F1C577EC064B6C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_E43CED8D3CDBD6209934C5771F08A43B" xlink:to="loc_us-gaap_SubsequentEventMember_595A9FC18F8629E447F1C577EC064B6C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:label="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_D1CA4147D3D243A502F8C571AE307567" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_04D9B294BB9047B001AFC571AE300592" xlink:to="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_D1CA4147D3D243A502F8C571AE307567" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain" xlink:label="loc_srt_EquityMethodInvesteeNameDomain_BE6A9552690343EEB5D8C571AE31A712_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_D1CA4147D3D243A502F8C571AE307567" xlink:to="loc_srt_EquityMethodInvesteeNameDomain_BE6A9552690343EEB5D8C571AE31A712_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain" xlink:label="loc_srt_EquityMethodInvesteeNameDomain_BE6A9552690343EEB5D8C571AE31A712" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_D1CA4147D3D243A502F8C571AE307567" xlink:to="loc_srt_EquityMethodInvesteeNameDomain_BE6A9552690343EEB5D8C571AE31A712" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MXPBPowerPartnersMember" xlink:label="loc_mtrx_MXPBPowerPartnersMember_3818C0FCE9B64CA305E3C571AE31BD83" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_EquityMethodInvesteeNameDomain_BE6A9552690343EEB5D8C571AE31A712" xlink:to="loc_mtrx_MXPBPowerPartnersMember_3818C0FCE9B64CA305E3C571AE31BD83" 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_D23F550C5A1E9E184DB5C571AE31E69A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_04D9B294BB9047B001AFC571AE300592" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_D23F550C5A1E9E184DB5C571AE31E69A" 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_D288C60EAAB2EBC57814C571AE32EDF8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D23F550C5A1E9E184DB5C571AE31E69A" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8_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_D288C60EAAB2EBC57814C571AE32EDF8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D23F550C5A1E9E184DB5C571AE31E69A" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_5A867F3D3A4F764DD0FAC571AE32A136" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8" xlink:to="loc_mtrx_HoustonInterestsLLCMember_5A867F3D3A4F764DD0FAC571AE32A136" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_A2407EA6C22CDAD18273C571AE323BD5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_A2407EA6C22CDAD18273C571AE323BD5" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HDBInc.Member" xlink:label="loc_mtrx_HDBInc.Member_B5B3069991FC79B209FBC571AE33BF67" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8" xlink:to="loc_mtrx_HDBInc.Member_B5B3069991FC79B209FBC571AE33BF67" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_KvaernerNorthAmericanConstructionMember" xlink:label="loc_mtrx_KvaernerNorthAmericanConstructionMember_1B07E74D732FE61E329BC571AE333357" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_D288C60EAAB2EBC57814C571AE32EDF8" xlink:to="loc_mtrx_KvaernerNorthAmericanConstructionMember_1B07E74D732FE61E329BC571AE333357" 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_F947E61D81AD1D55C9FDC5760DFE5BC3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_F947E61D81AD1D55C9FDC5760DFE5BC3" 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_3037795CFB6465097316C571AE3307FB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_3037795CFB6465097316C571AE3307FB" 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_49CB1EB541DF930CB3BDC571AE34B330" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessAcquisitionEffectiveDateOfAcquisition1_49CB1EB541DF930CB3BDC571AE34B330" 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_7AAA02F355985E94F5EDC571AE349278" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired_7AAA02F355985E94F5EDC571AE349278" 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_DFDFED9DCE00B4C3DF28C571AE34290E" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_DFDFED9DCE00B4C3DF28C571AE34290E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Economicpurchaseprice" xlink:label="loc_mtrx_Economicpurchaseprice_EA31BBCF51BF8897790EC571AE34804A" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_Economicpurchaseprice_EA31BBCF51BF8897790EC571AE34804A" 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_8C8A6C7078BCD8AEE00FC571AE345F04" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_Goodwill_8C8A6C7078BCD8AEE00FC571AE345F04" 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_381DB6870ECD3BBDC17AC571AE35DA18" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessAcquisitionPurchasePriceAllocationGoodwillExpectedTaxDeductibleAmount_381DB6870ECD3BBDC17AC571AE35DA18" 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_18F2A274820DE49DAD8CC571AE35055B" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_EquityMethodInvestmentOwnershipPercentage_18F2A274820DE49DAD8CC571AE35055B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Mtrx_JointVentureValue" xlink:label="loc_mtrx_Mtrx_JointVentureValue_EB8A7248CF2A4542364FC571AE355876" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_Mtrx_JointVentureValue_EB8A7248CF2A4542364FC571AE355876" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Mtrx_ControllingInterestOfJointVentureValue" xlink:label="loc_mtrx_Mtrx_ControllingInterestOfJointVentureValue_72E902F74CA6A7524DACC571AE368D31" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_Mtrx_ControllingInterestOfJointVentureValue_72E902F74CA6A7524DACC571AE368D31" 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_678600BC50F376506A87C571AE369C72" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_MinorityInterestInJointVentures_678600BC50F376506A87C571AE369C72" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Warrantyreserveworkingcapitalprovision" xlink:label="loc_mtrx_Warrantyreserveworkingcapitalprovision_E201DF6ED4D7AA4C3792C571AE36D198" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_Warrantyreserveworkingcapitalprovision_E201DF6ED4D7AA4C3792C571AE36D198" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Settlementofwarrantyreserve" xlink:label="loc_mtrx_Settlementofwarrantyreserve_873A1FE0E5812E26187EC571AE36B26B" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_Settlementofwarrantyreserve_873A1FE0E5812E26187EC571AE36B26B" 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_E7DE567CC146E9666866C571AE37AFAC" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessCombinationSeparatelyRecognizedTransactionsAdditionalDisclosuresAcquisitionCostExpensed_E7DE567CC146E9666866C571AE37AFAC" 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_F554A98CB56137267938C571AE37AC94" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessCombinationProFormaInformationRevenueOfAcquireeSinceAcquisitionDateActual_F554A98CB56137267938C571AE37AC94" 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_C617FFF62AAE5D579B36C571AE3766B3" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_us-gaap_BusinessCombinationProFormaInformationEarningsOrLossOfAcquireeSinceAcquisitionDateActual_C617FFF62AAE5D579B36C571AE3766B3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets" xlink:label="loc_mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets_43DDEEF40EF91F8D908FC571AE38A066" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_BusinessAcquisitionProFormaAmortizationofIntangibleAssets_43DDEEF40EF91F8D908FC571AE38A066" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BusinessAcquisitionProFormaDepreciationExpense" xlink:label="loc_mtrx_BusinessAcquisitionProFormaDepreciationExpense_8EFF2FF3023279A546D9C571AE385508" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_BusinessAcquisitionProFormaDepreciationExpense_8EFF2FF3023279A546D9C571AE385508" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement" xlink:label="loc_mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement_A6B6C86D2D352F5FE33BC571AE38F2ED" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_2FC58D4EB8230C31039AC571AE33E7DD" xlink:to="loc_mtrx_BusinessAcquisitionProFormaIncomefromTaxSettlement_A6B6C86D2D352F5FE33BC571AE38F2ED" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/AcquisitionsTables" 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_9A33F9D757ED4C89D650CEDF42CA8A60" 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_27C46153D3BDE4F26660CEDF42C88E1E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9A33F9D757ED4C89D650CEDF42CA8A60" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_27C46153D3BDE4F26660CEDF42C88E1E" 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_C0F770D576370D5C5441CEDF42C9F127" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_27C46153D3BDE4F26660CEDF42C88E1E" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_C0F770D576370D5C5441CEDF42C9F127" 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_247FE4B462E4A01219B6CEDF42C9B9D2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_C0F770D576370D5C5441CEDF42C9F127" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_247FE4B462E4A01219B6CEDF42C9B9D2_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_247FE4B462E4A01219B6CEDF42C9B9D2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_C0F770D576370D5C5441CEDF42C9F127" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_247FE4B462E4A01219B6CEDF42C9B9D2" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_2FFD6E8A518A7578C62CCEDF42C919BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_247FE4B462E4A01219B6CEDF42C9B9D2" xlink:to="loc_mtrx_HoustonInterestsLLCMember_2FFD6E8A518A7578C62CCEDF42C919BC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_535589296071078A10CACEDF42CA1BB4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_247FE4B462E4A01219B6CEDF42C9B9D2" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_535589296071078A10CACEDF42CA1BB4" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ConsiderationtransferredTableTextBlock" xlink:label="loc_mtrx_ConsiderationtransferredTableTextBlock_D57854C8C63D397B0311CEDF42CA1F25" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9A33F9D757ED4C89D650CEDF42CA8A60" xlink:to="loc_mtrx_ConsiderationtransferredTableTextBlock_D57854C8C63D397B0311CEDF42CA1F25" 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_8C91C20CA3A233EB9628CEDF42CBA366" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9A33F9D757ED4C89D650CEDF42CA8A60" xlink:to="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_8C91C20CA3A233EB9628CEDF42CBA366" 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_6694B5D6638812EAC076CEDF42CB2EE8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_9A33F9D757ED4C89D650CEDF42CA8A60" xlink:to="loc_us-gaap_BusinessAcquisitionProFormaInformationTextBlock_6694B5D6638812EAC076CEDF42CB2EE8" 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_C44BB40F693331393B74C56207F3D1FD" 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_FE979C86A41A425B6C20C56207EAE828" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_us-gaap_StatementTable_FE979C86A41A425B6C20C56207EAE828" 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_5B0D8367302DE08C9E0FC56207EB426E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_FE979C86A41A425B6C20C56207EAE828" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_5B0D8367302DE08C9E0FC56207EB426E" 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_B7F73B7D7A7D15F1EDB6C56207EC3E65_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_5B0D8367302DE08C9E0FC56207EB426E" xlink:to="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65_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_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_5B0D8367302DE08C9E0FC56207EB426E" xlink:to="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" 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_EFC1783052B0F61794EDC56207ECAEB8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_CommonStockMember_EFC1783052B0F61794EDC56207ECAEB8" 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_10D1E8F95C2E0BA560BDC56207EDB9FC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_10D1E8F95C2E0BA560BDC56207EDB9FC" 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_3896CABCE65A4D3DC4E0C56207ED174C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_RetainedEarningsMember_3896CABCE65A4D3DC4E0C56207ED174C" 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_F7298D24B1A2B01A30C2C56207EDFA23" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_TreasuryStockMember_F7298D24B1A2B01A30C2C56207EDFA23" 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_9C6A4E52E43CC1D2E9EAC56207EE3CFA" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_9C6A4E52E43CC1D2E9EAC56207EE3CFA" 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_06C499493A551F695F19C56207F3DB9F" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B7F73B7D7A7D15F1EDB6C56207EC3E65" xlink:to="loc_us-gaap_NoncontrollingInterestMember_06C499493A551F695F19C56207F3DB9F" 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_EF44434634F96EC4802CC56207F4D761" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption_EF44434634F96EC4802CC56207F4D761" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Beginningequitybalancesasadjusted" xlink:label="loc_mtrx_Beginningequitybalancesasadjusted_BD35D6DF271ACB548022C56207F521BB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_mtrx_Beginningequitybalancesasadjusted_BD35D6DF271ACB548022C56207F521BB" 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_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" 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_5E76666FF28331010E97C56207F58093" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_5E76666FF28331010E97C56207F58093" 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_690F53A05A896FC1D5B4C56207F6188E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_NoncontrollingInterestIncreaseFromSubsidiaryEquityIssuance_690F53A05A896FC1D5B4C56207F6188E" 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_BFE19535E0A457D3829AC56207F6E9E1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_ProfitLoss_BFE19535E0A457D3829AC56207F6E9E1" 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_400DEB5F20618D08D4B7C56207FA59EA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_400DEB5F20618D08D4B7C56207FA59EA" 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_7EC168E9F366E85F447AC56207FA0E37" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_7EC168E9F366E85F447AC56207FA0E37" 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_06647E8BFDBC25B837EDC56207FAED81" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_06647E8BFDBC25B837EDC56207FAED81" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IssuanceOfDeferredShares" xlink:label="loc_mtrx_IssuanceOfDeferredShares_80A5A00B08181FD4C151C56207FAF2F1" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_mtrx_IssuanceOfDeferredShares_80A5A00B08181FD4C151C56207FAF2F1" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_OtherTreasurySharePurchases" xlink:label="loc_mtrx_OtherTreasurySharePurchases_63FBF367D7753AAC3D83C56207FB91A2" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_mtrx_OtherTreasurySharePurchases_63FBF367D7753AAC3D83C56207FB91A2" 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_27B80EFADE1936E6F706C56207FBBAAF" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation_27B80EFADE1936E6F706C56207FBBAAF" 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_753F47A756EB0C651524C56207FBE0E4" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_753F47A756EB0C651524C56207FBE0E4" 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_19347FD2E6BD9369208DC56207FB56CD" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_19347FD2E6BD9369208DC56207FB56CD" 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_FC54879803AA8EE8F9A9C56207FB9099" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_DE82CE80A1B1BF32EEEBC56207F5DFB4" xlink:to="loc_us-gaap_PaymentsToAcquireInterestInJointVenture_FC54879803AA8EE8F9A9C56207FB9099" 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_75701D98E1113D38E175C56207FC349D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_us-gaap_NetIncomeLoss_75701D98E1113D38E175C56207FC349D" 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_1F783DCECBDD00F3FB77C56207FC7112" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C44BB40F693331393B74C56207F3D1FD" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_1F783DCECBDD00F3FB77C56207FC7112" 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_1A906645E041CA1BDE36C4478BA425E7" 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_5FAAB34DB56E02368A72C4478BA290B7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_us-gaap_StatementTable_5FAAB34DB56E02368A72C4478BA290B7" 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_AA91CF05B3EE9EA4BF79C4478BA34728" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5FAAB34DB56E02368A72C4478BA290B7" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_AA91CF05B3EE9EA4BF79C4478BA34728" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_AA91CF05B3EE9EA4BF79C4478BA34728" xlink:to="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07_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_22886E3005F0AD20D4ECC4478BA3AC07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_AA91CF05B3EE9EA4BF79C4478BA34728" xlink:to="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07" 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_7FEB90088F3A88CB73DDC4478BA31D69" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_7FEB90088F3A88CB73DDC4478BA31D69" 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_59E205700BA5554A1508C4478BA3D304" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07" xlink:to="loc_us-gaap_RetainedEarningsMember_59E205700BA5554A1508C4478BA3D304" 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_6752A84433CCC9EFF8EEC4478BA47953" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_22886E3005F0AD20D4ECC4478BA3AC07" xlink:to="loc_us-gaap_TreasuryStockMember_6752A84433CCC9EFF8EEC4478BA47953" 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_7F6A6F4CFA31BF9EA98EC4478BA4DF31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_7F6A6F4CFA31BF9EA98EC4478BA4DF31" 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_299989546E4B629B1BFBC4478BA48BD8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_299989546E4B629B1BFBC4478BA48BD8" 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_A4A1FF7E99051BE09190C4478BA4F034" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_A4A1FF7E99051BE09190C4478BA4F034" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_DeferredSharesIssued" xlink:label="loc_mtrx_DeferredSharesIssued_DB817421EDA3BA9FA782C4478BA56487" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_mtrx_DeferredSharesIssued_DB817421EDA3BA9FA782C4478BA56487" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_OtherTreasurySharesAcquired" xlink:label="loc_mtrx_OtherTreasurySharesAcquired_85AFA248E1E8BD3042CFC4478BA584C3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1A906645E041CA1BDE36C4478BA425E7" xlink:to="loc_mtrx_OtherTreasurySharesAcquired_85AFA248E1E8BD3042CFC4478BA584C3" 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/CustomerContracts" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CustomerContractsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CustomerContractsDetailsTextual" 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_BA270C851F38B1CF5B4DC4478AAAB581" 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_4731DA183B12CDF8FA11C4478AA8F9FF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_4731DA183B12CDF8FA11C4478AA8F9FF" 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_MajorCustomersAxis" xlink:label="loc_srt_MajorCustomersAxis_2753995D6239A05915B5C4478AA8F2BE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_4731DA183B12CDF8FA11C4478AA8F9FF" xlink:to="loc_srt_MajorCustomersAxis_2753995D6239A05915B5C4478AA8F2BE" 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_6CE7A5B9FBE1D8B76377C4478AA94521_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_2753995D6239A05915B5C4478AA8F2BE" xlink:to="loc_srt_NameOfMajorCustomerDomain_6CE7A5B9FBE1D8B76377C4478AA94521_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_6CE7A5B9FBE1D8B76377C4478AA94521" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_2753995D6239A05915B5C4478AA8F2BE" xlink:to="loc_srt_NameOfMajorCustomerDomain_6CE7A5B9FBE1D8B76377C4478AA94521" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SMElectricCompanyMember" xlink:label="loc_mtrx_SMElectricCompanyMember_5CB036C729EE223B13DCC4478AA9B81F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_6CE7A5B9FBE1D8B76377C4478AA94521" xlink:to="loc_mtrx_SMElectricCompanyMember_5CB036C729EE223B13DCC4478AA9B81F" 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_D579270ADC0FCA7150CEC4478AA9DDD2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_4731DA183B12CDF8FA11C4478AA8F9FF" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_D579270ADC0FCA7150CEC4478AA9DDD2" 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_2D6F63DEBBF7DC67A378C4478AAA4BBF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D579270ADC0FCA7150CEC4478AA9DDD2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2D6F63DEBBF7DC67A378C4478AAA4BBF_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_2D6F63DEBBF7DC67A378C4478AAA4BBF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D579270ADC0FCA7150CEC4478AA9DDD2" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2D6F63DEBBF7DC67A378C4478AAA4BBF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SmeMember" xlink:label="loc_mtrx_SmeMember_63C7EFEC0CF31F2231BAC4478AAA5E74" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2D6F63DEBBF7DC67A378C4478AAA4BBF" xlink:to="loc_mtrx_SmeMember_63C7EFEC0CF31F2231BAC4478AAA5E74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractReceivableRetainageDueOneYearOrLess" xlink:label="loc_us-gaap_ContractReceivableRetainageDueOneYearOrLess_893F198762E9E42A1DBFC4478AAA4008" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_us-gaap_ContractReceivableRetainageDueOneYearOrLess_893F198762E9E42A1DBFC4478AAA4008" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractReceivableRetainageDueAfterOneYear" xlink:label="loc_us-gaap_ContractReceivableRetainageDueAfterOneYear_1B33DF50B3E57F38E6FAC4478AAB33CD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_us-gaap_ContractReceivableRetainageDueAfterOneYear_1B33DF50B3E57F38E6FAC4478AAB33CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetentionPayable" xlink:label="loc_us-gaap_RetentionPayable_81BC8FF4CC3E7FCF455DC4478AAB8043" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_us-gaap_RetentionPayable_81BC8FF4CC3E7FCF455DC4478AAB8043" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ChangeInAccountingEstimateFinancialEffectOperatingIncome" xlink:label="loc_mtrx_ChangeInAccountingEstimateFinancialEffectOperatingIncome_8E506624E8CA366C6996C4478AAB788E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_mtrx_ChangeInAccountingEstimateFinancialEffectOperatingIncome_8E506624E8CA366C6996C4478AAB788E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ChangeinAccountingEstimateFinancialEffectNetIncome" xlink:label="loc_mtrx_ChangeinAccountingEstimateFinancialEffectNetIncome_AE639096F033E841D97DC4478AABFA76" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_BA270C851F38B1CF5B4DC4478AAAB581" xlink:to="loc_mtrx_ChangeinAccountingEstimateFinancialEffectNetIncome_AE639096F033E841D97DC4478AABFA76" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CustomerContractsTables" 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_072F61A4FA0FF0834461C4478B92969B" 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_C047CACFAD339CE8417CC4478B90365D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_072F61A4FA0FF0834461C4478B92969B" xlink:to="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_C047CACFAD339CE8417CC4478B90365D" 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_271C955D7442F52E4046C4478B908D48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_C047CACFAD339CE8417CC4478B90365D" xlink:to="loc_us-gaap_VariableRateAxis_271C955D7442F52E4046C4478B908D48" 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_1C06E4725ED2135FCD92C4478B909894_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_271C955D7442F52E4046C4478B908D48" xlink:to="loc_us-gaap_VariableRateDomain_1C06E4725ED2135FCD92C4478B909894_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_1C06E4725ED2135FCD92C4478B909894" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_271C955D7442F52E4046C4478B908D48" xlink:to="loc_us-gaap_VariableRateDomain_1C06E4725ED2135FCD92C4478B909894" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CdorRateMember" xlink:label="loc_mtrx_CdorRateMember_B6441A54BB81687F90B6C4478B915671" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_1C06E4725ED2135FCD92C4478B909894" xlink:to="loc_mtrx_CdorRateMember_B6441A54BB81687F90B6C4478B915671" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CanadianPrimeRateMember" xlink:label="loc_mtrx_CanadianPrimeRateMember_FB93E0845101303B8CBAC4478B911418" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_1C06E4725ED2135FCD92C4478B909894" xlink:to="loc_mtrx_CanadianPrimeRateMember_FB93E0845101303B8CBAC4478B911418" 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_412D3D813A27597CE946C4478B917746" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_C047CACFAD339CE8417CC4478B90365D" xlink:to="loc_srt_RangeAxis_412D3D813A27597CE946C4478B917746" 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_EF2F4A04E9551E9D981CC4478B921E99_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_412D3D813A27597CE946C4478B917746" xlink:to="loc_srt_RangeMember_EF2F4A04E9551E9D981CC4478B921E99_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_EF2F4A04E9551E9D981CC4478B921E99" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_412D3D813A27597CE946C4478B917746" xlink:to="loc_srt_RangeMember_EF2F4A04E9551E9D981CC4478B921E99" 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_87250A4C5D1F05D4D8ABC4478B92100B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_EF2F4A04E9551E9D981CC4478B921E99" xlink:to="loc_srt_MinimumMember_87250A4C5D1F05D4D8ABC4478B92100B" 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_8C95CD9F48DC4A9F3608C4478B920B66" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_EF2F4A04E9551E9D981CC4478B921E99" xlink:to="loc_srt_MaximumMember_8C95CD9F48DC4A9F3608C4478B920B66" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_DebtTextualAbstract" xlink:label="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_072F61A4FA0FF0834461C4478B92969B" xlink:to="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" 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_CF86E2C8088C586A69F5C4478B93CEE4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_CF86E2C8088C586A69F5C4478B93CEE4" 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_BF0140B7E9E7B68EC6BBC4478B93CC51" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_us-gaap_LineOfCreditFacilityExpirationDate1_BF0140B7E9E7B68EC6BBC4478B93CC51" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SeniorLeverageRatioMaximum" xlink:label="loc_mtrx_SeniorLeverageRatioMaximum_4FED6F51EF05EBF477F9C4478B9318A7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_SeniorLeverageRatioMaximum_4FED6F51EF05EBF477F9C4478B9318A7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SeniorLeverageRatioMinimum" xlink:label="loc_mtrx_SeniorLeverageRatioMinimum_18259C4E01E51C857C0CC4478B93C278" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_SeniorLeverageRatioMinimum_18259C4E01E51C857C0CC4478B93C278" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_FixedChargeCoverageRatioMaximum" xlink:label="loc_mtrx_FixedChargeCoverageRatioMaximum_8CB44A5462D2B1F30ED3C4478B94EBD5" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_FixedChargeCoverageRatioMaximum_8CB44A5462D2B1F30ED3C4478B94EBD5" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_FixedChargeCoverageRatioMinimum" xlink:label="loc_mtrx_FixedChargeCoverageRatioMinimum_167037438E8227588517C4478B945153" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_FixedChargeCoverageRatioMinimum_167037438E8227588517C4478B945153" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_AmountOfLimitOnAssetDispositions" xlink:label="loc_mtrx_AmountOfLimitOnAssetDispositions_A78F32B25D01F735E41AC4478B94FC04" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_AmountOfLimitOnAssetDispositions_A78F32B25D01F735E41AC4478B94FC04" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling" xlink:label="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_D675B12A5B60BDF813F0C4478B9403A6" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_D675B12A5B60BDF813F0C4478B9403A6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Sublimitonlettersofcreditunderthecreditfacility" xlink:label="loc_mtrx_Sublimitonlettersofcreditunderthecreditfacility_DAADFBED225C1488564AC4478B94EF45" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_Sublimitonlettersofcreditunderthecreditfacility_DAADFBED225C1488564AC4478B94EF45" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_1099ACBE498776BC80AEC4478B942B04" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_1099ACBE498776BC80AEC4478B942B04" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_BCB5F44131B540B0C266C4478B95A2A9" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_BCB5F44131B540B0C266C4478B95A2A9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_5BD259724AD0273F5067C4478B956DBD" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_5BD259724AD0273F5067C4478B956DBD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_F39E72E39E97D7008009C4478B959F53" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_F39E72E39E97D7008009C4478B959F53" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_D08AB2CBCDD3F687209CC4478B959B4C" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_D08AB2CBCDD3F687209CC4478B959B4C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_BC9ADA0FDC5B8CC385F5C4478B9598C5" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_BC9ADA0FDC5B8CC385F5C4478B9598C5" 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_BBEBBD7E3AEAE58597D7C4478B95948F" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_BBEBBD7E3AEAE58597D7C4478B95948F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MaximumLimitOfConsolidatedFundedIndebtedness" xlink:label="loc_mtrx_MaximumLimitOfConsolidatedFundedIndebtedness_BCA1B66A1A85947E1BC5C4478B96F465" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_MaximumLimitOfConsolidatedFundedIndebtedness_BCA1B66A1A85947E1BC5C4478B96F465" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement" xlink:label="loc_mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement_10CA067C9A75235852DBC4478B96B490" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_ConsolidatedEarningsBeforeInterestTaxesDepreciationAndAmortizationPerCreditAgreement_10CA067C9A75235852DBC4478B96B490" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ConsolidatedFundedIndebtedness" xlink:label="loc_mtrx_ConsolidatedFundedIndebtedness_20C3F8D0863B0FED7801C4478B964DFB" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_mtrx_ConsolidatedFundedIndebtedness_20C3F8D0863B0FED7801C4478B964DFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventsAbstract" xlink:label="loc_us-gaap_SubsequentEventsAbstract_02E18C23EACAD4870575C4478B96633B" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_DebtTextualAbstract_098B22DE1AF21E6B9940C4478B92EDE6" xlink:to="loc_us-gaap_SubsequentEventsAbstract_02E18C23EACAD4870575C4478B96633B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventDescription" xlink:label="loc_us-gaap_SubsequentEventDescription_700F829EE1748D44C514C4478B965028" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventsAbstract_02E18C23EACAD4870575C4478B96633B" xlink:to="loc_us-gaap_SubsequentEventDescription_700F829EE1748D44C514C4478B965028" 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_E9670122111E32CCF62BC4478B04D0A5" 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_FA743010CA133E954D7EC4478B046427" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_E9670122111E32CCF62BC4478B04D0A5" xlink:to="loc_dei_EntitiesTable_FA743010CA133E954D7EC4478B046427" 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_3C4DA5661CE067C189D9C4478B0442E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_FA743010CA133E954D7EC4478B046427" xlink:to="loc_dei_LegalEntityAxis_3C4DA5661CE067C189D9C4478B0442E9" 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_2701D5BF909FB7132540C4478B045D07_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_3C4DA5661CE067C189D9C4478B0442E9" xlink:to="loc_dei_EntityDomain_2701D5BF909FB7132540C4478B045D07_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_2701D5BF909FB7132540C4478B045D07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_3C4DA5661CE067C189D9C4478B0442E9" xlink:to="loc_dei_EntityDomain_2701D5BF909FB7132540C4478B045D07" 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_4C51F9E959AE761DCEDEC4478A99650F" 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_BDE7E9CEB947CF1FA636C4478A97C9D4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_4C51F9E959AE761DCEDEC4478A99650F" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_BDE7E9CEB947CF1FA636C4478A97C9D4" 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_1428143CB4A8279D935EC4478A983389" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_BDE7E9CEB947CF1FA636C4478A97C9D4" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_1428143CB4A8279D935EC4478A983389" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_1428143CB4A8279D935EC4478A983389" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_1428143CB4A8279D935EC4478A983389" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55" 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_BEF6A51AADE38DEEB14EC4478A982A4A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55" xlink:to="loc_us-gaap_EmployeeStockOptionMember_BEF6A51AADE38DEEB14EC4478A982A4A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_NonvestedDeferredSharesMember" xlink:label="loc_mtrx_NonvestedDeferredSharesMember_CA91531B3CB1EE16D189C4478A997A4D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_DE911C00DCEF32EABE82C4478A985A55" xlink:to="loc_mtrx_NonvestedDeferredSharesMember_CA91531B3CB1EE16D189C4478A997A4D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract" xlink:label="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_AB565E4D644471E125ABC4478A994B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_4C51F9E959AE761DCEDEC4478A99650F" xlink:to="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_AB565E4D644471E125ABC4478A994B31" 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_A55D5E9AD6481CB8C8BEC4478A9973EC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_AntidilutiveSecuritiesExcludedFromComputationOfDilutedEarningsPerShareAbstract_AB565E4D644471E125ABC4478A994B31" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_A55D5E9AD6481CB8C8BEC4478A9973EC" 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_6500125E0C41593A9316C4478BC1EF63" 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_420D47019889D92D2099C4478BBE1151" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_6500125E0C41593A9316C4478BC1EF63" xlink:to="loc_us-gaap_ScheduleOfMultiemployerPlansTable_420D47019889D92D2099C4478BBE1151" 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_B0596304B06320DBBE6EC4478BBE221B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_420D47019889D92D2099C4478BBE1151" xlink:to="loc_us-gaap_MultiemployerPlanTypeAxis_B0596304B06320DBBE6EC4478BBE221B" 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_5629CA2D7195345F909DC4478BBFC945_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_B0596304B06320DBBE6EC4478BBE221B" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945_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_5629CA2D7195345F909DC4478BBFC945" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_B0596304B06320DBBE6EC4478BBE221B" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BoilermakerBlacksmithNationalPensionTrustMember" xlink:label="loc_mtrx_BoilermakerBlacksmithNationalPensionTrustMember_970A8CD39CCAFC91AE77C4478BBFAA33" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_BoilermakerBlacksmithNationalPensionTrustMember_970A8CD39CCAFC91AE77C4478BBFAA33" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_JointPensionFundLocalUnionOneSixFourIbewMember" xlink:label="loc_mtrx_JointPensionFundLocalUnionOneSixFourIbewMember_1C853FE0291E5659CCF2C4478BBF9961" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_JointPensionFundLocalUnionOneSixFourIbewMember_1C853FE0291E5659CCF2C4478BBF9961" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain" xlink:label="loc_mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain_F34E049CD0C732E520BFC4478BC01F6D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_JointPensionFundLocalUnionNumberOneZeroTwoMemberDomain_F34E049CD0C732E520BFC4478BC01F6D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain" xlink:label="loc_mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain_A29B8127F1156C6652ADC4478BC072DB" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_IBEWLocalFourFiveSixPensionPlanMemberDomain_A29B8127F1156C6652ADC4478BC072DB" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_LocalThreeFiveOneIbewPensionPlanMember" xlink:label="loc_mtrx_LocalThreeFiveOneIbewPensionPlanMember_E628F95DB1F95306454DC4478BC00DEF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_LocalThreeFiveOneIbewPensionPlanMember_E628F95DB1F95306454DC4478BC00DEF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain" xlink:label="loc_mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain_DFAD03EBF20BC987663AC4478BC03DC9" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_SteamfittersLocalUnionNumberFourTwoZeroPensionPlanMemberDomain_DFAD03EBF20BC987663AC4478BC03DC9" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IBEWLocalUnionNineEightPensionPlanMember" xlink:label="loc_mtrx_IBEWLocalUnionNineEightPensionPlanMember_3007AA0B16AB922B5A53C4478BC018C4" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_IBEWLocalUnionNineEightPensionPlanMember_3007AA0B16AB922B5A53C4478BC018C4" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IndianaLaborersPensionFundDomain" xlink:label="loc_mtrx_IndianaLaborersPensionFundDomain_13A79ED68EFAE345BAEBC4478BC01442" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_IndianaLaborersPensionFundDomain_13A79ED68EFAE345BAEBC4478BC01442" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IronworkersMidAmericaPensionPlanMember" xlink:label="loc_mtrx_IronworkersMidAmericaPensionPlanMember_C39C55D76192717D46C1C4478BC14870" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_IronworkersMidAmericaPensionPlanMember_C39C55D76192717D46C1C4478BC14870" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember" xlink:label="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_8EE8D4B4D02723F6F64DC4478BC11B47" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_8EE8D4B4D02723F6F64DC4478BC11B47" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PipefittersRetirementFundLocalFiveNineSevenMember" xlink:label="loc_mtrx_PipefittersRetirementFundLocalFiveNineSevenMember_FC37643AE89CA4E45EC9C4478BC1BF8E" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_5629CA2D7195345F909DC4478BBFC945" xlink:to="loc_mtrx_PipefittersRetirementFundLocalFiveNineSevenMember_FC37643AE89CA4E45EC9C4478BC1BF8E" 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_A36048BB98751B80491CC4478BC15805" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_6500125E0C41593A9316C4478BC1EF63" xlink:to="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDateDescription_A36048BB98751B80491CC4478BC15805" 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_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_6500125E0C41593A9316C4478BC1EF63" xlink:to="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlansNumber" xlink:label="loc_mtrx_MultiemployerPlansNumber_39E8630C0332F4CFA37CC4478BC20506" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_mtrx_MultiemployerPlansNumber_39E8630C0332F4CFA37CC4478BC20506" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlansCertifiedZoneStatusDescription" xlink:label="loc_mtrx_MultiemployerPlansCertifiedZoneStatusDescription_9C1B7D28EB3D9F9DA215C4478BC23331" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_mtrx_MultiemployerPlansCertifiedZoneStatusDescription_9C1B7D28EB3D9F9DA215C4478BC23331" 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_DC404EEBF0CB285DFD61C4478BC2B718" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_us-gaap_MultiemployerPlansCertifiedZoneStatus_DC404EEBF0CB285DFD61C4478BC2B718" 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_AA36BAA5676D38805D82C4478BC26A2E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_us-gaap_MultiemployerPlansFundingImprovementPlanAndRehabilitationPlan_AA36BAA5676D38805D82C4478BC26A2E" 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_9D19DC850A08212B6ECFC4478BC39C7B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_us-gaap_MultiemployerPlanContributionsByEmployer_9D19DC850A08212B6ECFC4478BC39C7B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlanSurcharge" xlink:label="loc_mtrx_MultiemployerPlanSurcharge_DF5F8172E57ADD55A8DFC4478BC38249" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_mtrx_MultiemployerPlanSurcharge_DF5F8172E57ADD55A8DFC4478BC38249" 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_CE33150CC7B52CC5C251C4478BC36DD9" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_us-gaap_MultiemployerPlansSurcharge_CE33150CC7B52CC5C251C4478BC36DD9" 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_32501551967DD7A22A62C4478BC3F731" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_us-gaap_MultiemployerPlansCollectiveBargainingArrangementExpirationDate_32501551967DD7A22A62C4478BC3F731" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ContributionsToOtherMultiemployerPlans" xlink:label="loc_mtrx_ContributionsToOtherMultiemployerPlans_6CA3215C3284E14A0B3EC4478BC3C235" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansAbstract_BF9A35C3CF3545E5CDD2C4478BC26614" xlink:to="loc_mtrx_ContributionsToOtherMultiemployerPlans_6CA3215C3284E14A0B3EC4478BC3C235" 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_E1F0B136A546DBCB9148C4478BAF5359" 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_BFB3496C0EF204BD30CFC4478BACF189" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_E1F0B136A546DBCB9148C4478BAF5359" xlink:to="loc_us-gaap_ScheduleOfMultiemployerPlansTable_BFB3496C0EF204BD30CFC4478BACF189" 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_EDAF1B50F1F042AAA8D9C4478BAD834B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_BFB3496C0EF204BD30CFC4478BACF189" xlink:to="loc_us-gaap_MultiemployerPlanTypeAxis_EDAF1B50F1F042AAA8D9C4478BAD834B" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_EDAF1B50F1F042AAA8D9C4478BAD834B" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_31E7E942E9CAFC691156C4478BADC94B_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_31E7E942E9CAFC691156C4478BADC94B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MultiemployerPlanTypeAxis_EDAF1B50F1F042AAA8D9C4478BAD834B" xlink:to="loc_us-gaap_MultiemployerPlansTypeDomain_31E7E942E9CAFC691156C4478BADC94B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember" xlink:label="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_79476A5D746C6EE3238DC4478BADD6A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansTypeDomain_31E7E942E9CAFC691156C4478BADC94B" xlink:to="loc_mtrx_PlumbersandPipefittersLocalUnionSevenFourPensionFundMember_79476A5D746C6EE3238DC4478BADD6A0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlanZoneByTypeAxis" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeAxis_19058E6F5D58F6B8B1D4C4478BAE1735" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfMultiemployerPlansTable_BFB3496C0EF204BD30CFC4478BACF189" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeAxis_19058E6F5D58F6B8B1D4C4478BAE1735" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlanZoneByTypeDomain" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeAxis_19058E6F5D58F6B8B1D4C4478BAE1735" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D_default" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MultiemployerPlanZoneByTypeDomain" xlink:label="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeAxis_19058E6F5D58F6B8B1D4C4478BAE1735" xlink:to="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ZoneRedMember" xlink:label="loc_mtrx_ZoneRedMember_40299766BD3C44746CF1C4478BAEE787" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D" xlink:to="loc_mtrx_ZoneRedMember_40299766BD3C44746CF1C4478BAEE787" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ZoneYellowMember" xlink:label="loc_mtrx_ZoneYellowMember_8D4E06AD40269171F8A2C4478BAEE400" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D" xlink:to="loc_mtrx_ZoneYellowMember_8D4E06AD40269171F8A2C4478BAEE400" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ZoneGreenMember" xlink:label="loc_mtrx_ZoneGreenMember_63B7FF6EA479413734C9C4478BAF425D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_MultiemployerPlanZoneByTypeDomain_9E008E5D2E5C098C6DA7C4478BAE846D" xlink:to="loc_mtrx_ZoneGreenMember_63B7FF6EA479413734C9C4478BAF425D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PercentageOfPlanFunded" xlink:label="loc_mtrx_PercentageOfPlanFunded_E7D1C5D76C715D251436C4478BAF3B3F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_E1F0B136A546DBCB9148C4478BAF5359" xlink:to="loc_mtrx_PercentageOfPlanFunded_E7D1C5D76C715D251436C4478BAF3B3F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_DescriptionOfFundedPortionOfPlan" xlink:label="loc_mtrx_DescriptionOfFundedPortionOfPlan_C2FC943B318432390772C4478BAFD0B2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MultiemployerPlansLineItems_E1F0B136A546DBCB9148C4478BAF5359" xlink:to="loc_mtrx_DescriptionOfFundedPortionOfPlan_C2FC943B318432390772C4478BAFD0B2" 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_EA2BFF9E8A810B06599FC585ECA2130F" 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_77C4743BFDE55E5B583CC585ECA0E951" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_EA2BFF9E8A810B06599FC585ECA2130F" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_77C4743BFDE55E5B583CC585ECA0E951" 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_1629082AF0679AB29108C585ECA0883A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_77C4743BFDE55E5B583CC585ECA0E951" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_1629082AF0679AB29108C585ECA0883A" 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_5A9D64AF808897710FFDC585ECA1E803_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1629082AF0679AB29108C585ECA0883A" xlink:to="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803_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_5A9D64AF808897710FFDC585ECA1E803" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1629082AF0679AB29108C585ECA0883A" xlink:to="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_C2144F552FDE4E3D0C3EC585ECA15499" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:to="loc_mtrx_ElectricalInfrastructureMember_C2144F552FDE4E3D0C3EC585ECA15499" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_28485D320F46FEE8EF3FC585ECA1B24D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:to="loc_mtrx_OilGasAndChemicalMember_28485D320F46FEE8EF3FC585ECA1B24D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_F97177413E725498D215C585ECA19BEE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:to="loc_mtrx_StorageSolutionsMember_F97177413E725498D215C585ECA19BEE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_9FD5C1F056724F13B63FC585ECA14540" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:to="loc_mtrx_IndustrialMember_9FD5C1F056724F13B63FC585ECA14540" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ReportingUnitMember" xlink:label="loc_mtrx_ReportingUnitMember_12E51510EC4316D8D546C585ECA11FAB" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_5A9D64AF808897710FFDC585ECA1E803" xlink:to="loc_mtrx_ReportingUnitMember_12E51510EC4316D8D546C585ECA11FAB" 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_63555F735CD2C5C6A657C585ECA2C7CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_EA2BFF9E8A810B06599FC585ECA2130F" xlink:to="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" 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_716A28421AD4C2F53E9CC585ECA26415" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_GoodwillGross_716A28421AD4C2F53E9CC585ECA26415" 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_A0AB3D956A852656E185C585ECA20F56" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_A0AB3D956A852656E185C585ECA20F56" 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_098BD61A77AA59AAF983C585ECA3D141" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_Goodwill_098BD61A77AA59AAF983C585ECA3D141" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement" xlink:label="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_66C9B83948AD95E8FD26C585ECA38B7F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_mtrx_AcquisitionRelatedAdjustmentForFinalWorkingCapitalSettlement_66C9B83948AD95E8FD26C585ECA38B7F" 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_7FD685FB7DA246FEAD25C585ECA311E7" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_7FD685FB7DA246FEAD25C585ECA311E7" 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_C28408914225EC4C3348C58FD81E5429" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_C28408914225EC4C3348C58FD81E5429" 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_EA68567C80E6A6E0EFB6C585ECA38644" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_EA68567C80E6A6E0EFB6C585ECA38644" 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_0F9B82A320EF043EC864C585ECA325B1" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_63555F735CD2C5C6A657C585ECA2C7CE" xlink:to="loc_us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount_0F9B82A320EF043EC864C585ECA325B1" 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_D6232089D926C9EA6412C4478C40FCB4" 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_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_D6232089D926C9EA6412C4478C40FCB4" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" 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_7A9375A3DF8B0AB88029C4478C3BDA00" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_7A9375A3DF8B0AB88029C4478C3BDA00" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7A9375A3DF8B0AB88029C4478C3BDA00" xlink:to="loc_us-gaap_SegmentDomain_C5EA914329CB76E09D40C4478C3BB431_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_C5EA914329CB76E09D40C4478C3BB431" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7A9375A3DF8B0AB88029C4478C3BDA00" xlink:to="loc_us-gaap_SegmentDomain_C5EA914329CB76E09D40C4478C3BB431" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ReportingUnitMember" xlink:label="loc_mtrx_ReportingUnitMember_528762A04CA5B7AD8D5BC4478C3BD5C9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_C5EA914329CB76E09D40C4478C3BB431" xlink:to="loc_mtrx_ReportingUnitMember_528762A04CA5B7AD8D5BC4478C3BD5C9" 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_10CE6784A310DB7F648DC4478C3C452D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_10CE6784A310DB7F648DC4478C3C452D" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_10CE6784A310DB7F648DC4478C3C452D" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705_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_B3DAB3C989248748F554C4478C3C3705" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_10CE6784A310DB7F648DC4478C3C452D" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_BaillieTankEquipmentLtd.Member" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_963FBED9B6105D0BB811C4478C3C6EF6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_963FBED9B6105D0BB811C4478C3C6EF6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_HoustonInterestsLLCMember" xlink:label="loc_mtrx_HoustonInterestsLLCMember_319A3F5A64CE8D3954ECC4478C3DC395" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3DAB3C989248748F554C4478C3C3705" xlink:to="loc_mtrx_HoustonInterestsLLCMember_319A3F5A64CE8D3954ECC4478C3DC395" 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_EAFC928F4387F467C835C4478C3DE308" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_EAFC928F4387F467C835C4478C3DE308" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_EAFC928F4387F467C835C4478C3DE308" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_EAFC928F4387F467C835C4478C3DE308" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_SMElectricTradeNameMember" xlink:label="loc_mtrx_SMElectricTradeNameMember_F0013769A4A3B486E49AC4478C3D1F87" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:to="loc_mtrx_SMElectricTradeNameMember_F0013769A4A3B486E49AC4478C3D1F87" 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_F75ABE81D7EA9DE73CDFC4478C3EB57E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:to="loc_us-gaap_IntellectualPropertyMember_F75ABE81D7EA9DE73CDFC4478C3EB57E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerBasedMember" xlink:label="loc_mtrx_CustomerBasedMember_7F36B1CBE934D412BD2EC4478C3E3DDB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:to="loc_mtrx_CustomerBasedMember_7F36B1CBE934D412BD2EC4478C3E3DDB" 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_7606BEF32AB2E0AA0A32C4478C3EE02C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:to="loc_us-gaap_NoncompeteAgreementsMember_7606BEF32AB2E0AA0A32C4478C3EE02C" 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_32D4CA96DC3C7F2A25FAC4478C3E6386" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_E2136E7A66EF7D34BE5BC4478C3D67C6" xlink:to="loc_us-gaap_TradeNamesMember_32D4CA96DC3C7F2A25FAC4478C3E6386" 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_BA86FEF74DC3CBDBF2D3C4478C3F4F25" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_BA86FEF74DC3CBDBF2D3C4478C3F4F25" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_BA86FEF74DC3CBDBF2D3C4478C3F4F25" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_05C662716FBFEC5CADECC4478C3F78AA_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_BA86FEF74DC3CBDBF2D3C4478C3F4F25" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_05C662716FBFEC5CADECC4478C3F78AA" 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_E37A2FCE0F97A5844E7AC4478C3F6947" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_05C662716FBFEC5CADECC4478C3F78AA" xlink:to="loc_us-gaap_TradeNamesMember_E37A2FCE0F97A5844E7AC4478C3F6947" 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_66FDA858BF00D77A3CA3C4478C3FF3EF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_F33AD8B1EB1027FD7901C4478C3BFD89" xlink:to="loc_srt_RangeAxis_66FDA858BF00D77A3CA3C4478C3FF3EF" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_66FDA858BF00D77A3CA3C4478C3FF3EF" xlink:to="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED_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_6FE36A1635A7547064F2C4478C3F81ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_66FDA858BF00D77A3CA3C4478C3FF3EF" xlink:to="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED" 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_AC25EEE58BA15CF5A5E4C4478C404D0E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED" xlink:to="loc_srt_MinimumMember_AC25EEE58BA15CF5A5E4C4478C404D0E" 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_359AE9287F3DF9EB15AFC4478C4045A0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_6FE36A1635A7547064F2C4478C3F81ED" xlink:to="loc_srt_MaximumMember_359AE9287F3DF9EB15AFC4478C4045A0" 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_CD8C410630DE468F0B82C4478C4021FA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_D6232089D926C9EA6412C4478C40FCB4" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_CD8C410630DE468F0B82C4478C4021FA" 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_B89FE2679C10580E0C35C4478C41E384" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_D6232089D926C9EA6412C4478C40FCB4" xlink:to="loc_us-gaap_FiniteLivedTradeNamesGross_B89FE2679C10580E0C35C4478C41E384" 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_254A932D73D021ECC027C4478C41FF73" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_D6232089D926C9EA6412C4478C40FCB4" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsFairValueDisclosure_254A932D73D021ECC027C4478C41FF73" 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_3111D21CAE64CCE08E19C4478C41D7F7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_D6232089D926C9EA6412C4478C40FCB4" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" 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_F94D892586DFDE149031C4478C4192CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_F94D892586DFDE149031C4478C4192CE" 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_5F749385CD69031CB54AC4478C429B9B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_5F749385CD69031CB54AC4478C429B9B" 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_FF0B0B498B67AB220D2FC4478C425398" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_FF0B0B498B67AB220D2FC4478C425398" 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_F08CA19C7D445CC3569BC4478C420643" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_F08CA19C7D445CC3569BC4478C420643" 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_0DA3EE378A7D9341B4B8C4478C4252F3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_IndefiniteLivedTradeNames_0DA3EE378A7D9341B4B8C4478C4252F3" 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_2B81DE79B97999F8FC01C4478C4294C3" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_IntangibleAssetsGrossExcludingGoodwill_2B81DE79B97999F8FC01C4478C4294C3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill" xlink:label="loc_mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill_2A460B0C77EF7636F567C4478C42D1EB" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_mtrx_IntangibleAssetsAccumulatedAmortizationExcludingGoodwill_2A460B0C77EF7636F567C4478C42D1EB" 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_803325420783C5FF4C00C4478C43B129" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_803325420783C5FF4C00C4478C43B129" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Netbookvalueofintangibleassetatriskofimpairment" xlink:label="loc_mtrx_Netbookvalueofintangibleassetatriskofimpairment_D8B397B930C4529C5C06C4478C430FED" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract_3111D21CAE64CCE08E19C4478C41D7F7" xlink:to="loc_mtrx_Netbookvalueofintangibleassetatriskofimpairment_D8B397B930C4529C5C06C4478C430FED" 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_AC2FBD2F79985BDF3F37C4478BF89CD4" 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_3097DBFEE701803E7719C4478BF5F7A9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_AC2FBD2F79985BDF3F37C4478BF89CD4" xlink:to="loc_us-gaap_TaxCreditCarryforwardTable_3097DBFEE701803E7719C4478BF5F7A9" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IncomeTaxAuthorityDescriptionAxis" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_658BDC6878B0CC532FADC4478BF50EF8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_3097DBFEE701803E7719C4478BF5F7A9" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_658BDC6878B0CC532FADC4478BF50EF8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IncomeTaxAuthorityDescriptionDomain" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_658BDC6878B0CC532FADC4478BF50EF8" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0_default" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IncomeTaxAuthorityDescriptionDomain" xlink:label="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionAxis_658BDC6878B0CC532FADC4478BF50EF8" xlink:to="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_StatetaxcreditMember" xlink:label="loc_mtrx_StatetaxcreditMember_9288F2306CB1C6071B18C4478BF6E08B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0" xlink:to="loc_mtrx_StatetaxcreditMember_9288F2306CB1C6071B18C4478BF6E08B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_FederaltaxcreditcarryforwardMember" xlink:label="loc_mtrx_FederaltaxcreditcarryforwardMember_F13142172BB7C2F70DEDC4478BF601BD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0" xlink:to="loc_mtrx_FederaltaxcreditcarryforwardMember_F13142172BB7C2F70DEDC4478BF601BD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ForeigntaxcreditcarryforwardMember" xlink:label="loc_mtrx_ForeigntaxcreditcarryforwardMember_E03D4E74B2C4AE73650DC4478BF60A59" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_IncomeTaxAuthorityDescriptionDomain_29F9902284F881D9A2D2C4478BF624A0" xlink:to="loc_mtrx_ForeigntaxcreditcarryforwardMember_E03D4E74B2C4AE73650DC4478BF60A59" 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_455722957AD832D3D3CFC4478BF79717" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_3097DBFEE701803E7719C4478BF5F7A9" xlink:to="loc_us-gaap_TaxCreditCarryforwardAxis_455722957AD832D3D3CFC4478BF79717" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxCreditCarryforwardAxis_455722957AD832D3D3CFC4478BF79717" xlink:to="loc_us-gaap_TaxCreditCarryforwardNameDomain_87D1720C7EB4688A8252C4478BF7D766_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxCreditCarryforwardAxis_455722957AD832D3D3CFC4478BF79717" xlink:to="loc_us-gaap_TaxCreditCarryforwardNameDomain_87D1720C7EB4688A8252C4478BF7D766" 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_7671EECDA3355DE7A0F1C4478BF720E6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_3097DBFEE701803E7719C4478BF5F7A9" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameAxis_7671EECDA3355DE7A0F1C4478BF720E6" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_7671EECDA3355DE7A0F1C4478BF720E6" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_958C7D52A976705AB760C4478BF7034F_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_7671EECDA3355DE7A0F1C4478BF720E6" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_958C7D52A976705AB760C4478BF7034F" 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_B95EF4DE0DAFA113D47DC4478BF820BB" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TaxCreditCarryforwardTable_3097DBFEE701803E7719C4478BF5F7A9" xlink:to="loc_us-gaap_TaxPeriodAxis_B95EF4DE0DAFA113D47DC4478BF820BB" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxPeriodAxis_B95EF4DE0DAFA113D47DC4478BF820BB" xlink:to="loc_us-gaap_TaxPeriodDomain_105486F187A7192524D4C4478BF83415_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxPeriodAxis_B95EF4DE0DAFA113D47DC4478BF820BB" xlink:to="loc_us-gaap_TaxPeriodDomain_105486F187A7192524D4C4478BF83415" 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_6547D560E4691932C071C4478BF8BD6B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_AC2FBD2F79985BDF3F37C4478BF89CD4" xlink:to="loc_us-gaap_TaxCreditCarryforwardDescription_6547D560E4691932C071C4478BF8BD6B" 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_39D8F3CD4B6892BF16F1C4478BF83A75" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TaxCreditCarryforwardLineItems_AC2FBD2F79985BDF3F37C4478BF89CD4" xlink:to="loc_us-gaap_TaxCreditCarryforwardAmount_39D8F3CD4B6892BF16F1C4478BF83A75" 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_2EC847C91AB20CABD2A3C5E500E1CCEB" 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_601FEB469A6381B01062C5E500DE2AE1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_2EC847C91AB20CABD2A3C5E500E1CCEB" xlink:to="loc_us-gaap_OperatingLossCarryforwardsTable_601FEB469A6381B01062C5E500DE2AE1" 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_FB9BBD30792B1D4FBF14C5E500DF68EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_601FEB469A6381B01062C5E500DE2AE1" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_FB9BBD30792B1D4FBF14C5E500DF68EB" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_FB9BBD30792B1D4FBF14C5E500DF68EB" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_FB9BBD30792B1D4FBF14C5E500DF68EB" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121" 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_3569E27570BC1C5149AAC5E500DFB333" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_3569E27570BC1C5149AAC5E500DFB333" 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_5243751F662E0128E6ACC5E500E0987F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_F0CA8398542D21BA705DC5E500DFF121" xlink:to="loc_us-gaap_ForeignCountryMember_5243751F662E0128E6ACC5E500E0987F" 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_B0E572BC23C836B4D395C5E500E07E40" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_601FEB469A6381B01062C5E500DE2AE1" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameAxis_B0E572BC23C836B4D395C5E500E07E40" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_B0E572BC23C836B4D395C5E500E07E40" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_A5C5F09A8668FA1567F6C5E500E01525_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_B0E572BC23C836B4D395C5E500E07E40" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_A5C5F09A8668FA1567F6C5E500E01525" 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_AD9137BC08E63E7C6346C5E500E02986" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_601FEB469A6381B01062C5E500DE2AE1" xlink:to="loc_us-gaap_TaxPeriodAxis_AD9137BC08E63E7C6346C5E500E02986" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TaxPeriodAxis_AD9137BC08E63E7C6346C5E500E02986" xlink:to="loc_us-gaap_TaxPeriodDomain_2CB1D9C41C3EFC53655DC5E500E0FDD1_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TaxPeriodAxis_AD9137BC08E63E7C6346C5E500E02986" xlink:to="loc_us-gaap_TaxPeriodDomain_2CB1D9C41C3EFC53655DC5E500E0FDD1" 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_86F6A203B39987D758EBC5E500E1BF90" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_2EC847C91AB20CABD2A3C5E500E1CCEB" xlink:to="loc_us-gaap_OperatingLossCarryforwardsLimitationsOnUse_86F6A203B39987D758EBC5E500E1BF90" 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_4FA9DAEE991CEEC78B06C5E500E65291" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_2EC847C91AB20CABD2A3C5E500E1CCEB" xlink:to="loc_us-gaap_OperatingLossCarryforwards_4FA9DAEE991CEEC78B06C5E500E65291" 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/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_5F7561C0ABCB7EE144B4C4478BE8C304" 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_4B3F4F069CC66B5904B2C4478BE5C5F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5F7561C0ABCB7EE144B4C4478BE8C304" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4B3F4F069CC66B5904B2C4478BE5C5F7" 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_4C0666638BD6EC82B91DC4478BE5DC76" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4B3F4F069CC66B5904B2C4478BE5C5F7" xlink:to="loc_srt_ConsolidationItemsAxis_4C0666638BD6EC82B91DC4478BE5DC76" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_4C0666638BD6EC82B91DC4478BE5DC76" xlink:to="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_4C0666638BD6EC82B91DC4478BE5DC76" xlink:to="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC" 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_D2C3FCBD023D7F617B81C4478BE6D8D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC" xlink:to="loc_us-gaap_OperatingSegmentsMember_D2C3FCBD023D7F617B81C4478BE6D8D0" 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_A89C7348452E63C82C61C4478BE675B1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_D2FE148436392D1F45ACC4478BE5E0BC" xlink:to="loc_us-gaap_IntersegmentEliminationMember_A89C7348452E63C82C61C4478BE675B1" 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_EDA4272CD39E24195072C4478BE60B47" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4B3F4F069CC66B5904B2C4478BE5C5F7" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_EDA4272CD39E24195072C4478BE60B47" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_EDA4272CD39E24195072C4478BE60B47" xlink:to="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479_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_E164EAEF418C9080F3B3C4478BE63479" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_EDA4272CD39E24195072C4478BE60B47" xlink:to="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_4634D6BC5069DEEADB18C4478BE71563" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:to="loc_mtrx_ElectricalInfrastructureMember_4634D6BC5069DEEADB18C4478BE71563" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_0E17B3833FA56523860AC4478BE783E2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:to="loc_mtrx_OilGasAndChemicalMember_0E17B3833FA56523860AC4478BE783E2" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_DA4E7BDFC06AF42DC4DAC4478BE7EB3A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:to="loc_mtrx_StorageSolutionsMember_DA4E7BDFC06AF42DC4DAC4478BE7EB3A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_7C638CCA3BD43AACAE14C4478BE7523F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:to="loc_mtrx_IndustrialMember_7C638CCA3BD43AACAE14C4478BE7523F" 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_7F8B35534DC859944234C4478BE752EC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_E164EAEF418C9080F3B3C4478BE63479" xlink:to="loc_us-gaap_AllOtherSegmentsMember_7F8B35534DC859944234C4478BE752EC" 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_3679F9A4A248882EE6F1C4478BE8B82F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5F7561C0ABCB7EE144B4C4478BE8C304" xlink:to="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Grossrevenues" xlink:label="loc_mtrx_Grossrevenues_2030B59882DCF8703C23C4478BE89360" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_mtrx_Grossrevenues_2030B59882DCF8703C23C4478BE89360" 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_A9F765BA84BA27A379E0C4478BE82117" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_Revenues_A9F765BA84BA27A379E0C4478BE82117" 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_8148FDF320C6AE3F43ABC4478BE92E97" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_GrossProfit_8148FDF320C6AE3F43ABC4478BE92E97" 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_DFF126713D2E1D54F81AC4478BE9EBBE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_OperatingIncomeLoss_DFF126713D2E1D54F81AC4478BE9EBBE" 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_5D732EDFEFB4E9B08B46C4478BE95C64" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_Assets_5D732EDFEFB4E9B08B46C4478BE95C64" 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_D123C857B3B891C10228C4478BE98DAB" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_D123C857B3B891C10228C4478BE98DAB" 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_E910E291B1511FB3C118C4478BE96ABC" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_3679F9A4A248882EE6F1C4478BE8B82F" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_E910E291B1511FB3C118C4478BE96ABC" 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_964C8261CB8C15B09416CE5C23FC1240" 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_1D7F9CBC28799575C378CE5C23FA5DF9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_964C8261CB8C15B09416CE5C23FC1240" xlink:to="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_1D7F9CBC28799575C378CE5C23FA5DF9" 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_0FF86E6405A9539191DBCE5C23FB536C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_1D7F9CBC28799575C378CE5C23FA5DF9" xlink:to="loc_srt_StatementGeographicalAxis_0FF86E6405A9539191DBCE5C23FB536C" 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_4BAB27C52C23822CEC6DCE5C23FBFE84_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_0FF86E6405A9539191DBCE5C23FB536C" xlink:to="loc_srt_SegmentGeographicalDomain_4BAB27C52C23822CEC6DCE5C23FBFE84_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_4BAB27C52C23822CEC6DCE5C23FBFE84" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_0FF86E6405A9539191DBCE5C23FB536C" xlink:to="loc_srt_SegmentGeographicalDomain_4BAB27C52C23822CEC6DCE5C23FBFE84" 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_5451E944646FB76CC0C4CE5C23FB3856" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_4BAB27C52C23822CEC6DCE5C23FBFE84" xlink:to="loc_country_US_5451E944646FB76CC0C4CE5C23FB3856" 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_7282D48B03D7B8A6C3E9CE5C23FB0716" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_4BAB27C52C23822CEC6DCE5C23FBFE84" xlink:to="loc_country_CA_7282D48B03D7B8A6C3E9CE5C23FB0716" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_InternationalMember" xlink:label="loc_mtrx_InternationalMember_4288441284DA6D689AE0CE5C23FC9400" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_4BAB27C52C23822CEC6DCE5C23FBFE84" xlink:to="loc_mtrx_InternationalMember_4288441284DA6D689AE0CE5C23FC9400" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract" xlink:label="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_0A5370D0E28D4E733FA9CE5C23FC078C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_964C8261CB8C15B09416CE5C23FC1240" xlink:to="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_0A5370D0E28D4E733FA9CE5C23FC078C" 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_D338E3F029C95FE9B56FCE6E6959C95F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_0A5370D0E28D4E733FA9CE5C23FC078C" xlink:to="loc_us-gaap_Revenues_D338E3F029C95FE9B56FCE6E6959C95F" 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_BE99B0A8BDDBE08D29A2CE5C23FDAD45" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfSegmentReportingInformationByGeographicAreasAbstract_0A5370D0E28D4E733FA9CE5C23FC078C" xlink:to="loc_us-gaap_NoncurrentAssets_BE99B0A8BDDBE08D29A2CE5C23FDAD45" 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_262D3EDE6A9430AA09C3C634CFEC0765" 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_06B7959BF7478DDBD6A4C634CFE7BDB2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_262D3EDE6A9430AA09C3C634CFEC0765" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_06B7959BF7478DDBD6A4C634CFE7BDB2" 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_1107C692AB56F538BE65C634CFE76FEB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_06B7959BF7478DDBD6A4C634CFE7BDB2" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_1107C692AB56F538BE65C634CFE76FEB" 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_879D2770CEB4A581CB1BC634CFE71D10_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1107C692AB56F538BE65C634CFE76FEB" xlink:to="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10_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_879D2770CEB4A581CB1BC634CFE71D10" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1107C692AB56F538BE65C634CFE76FEB" xlink:to="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ElectricalInfrastructureMember" xlink:label="loc_mtrx_ElectricalInfrastructureMember_DF5E65AD85D2AF4932CDC634CFE8EE60" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10" xlink:to="loc_mtrx_ElectricalInfrastructureMember_DF5E65AD85D2AF4932CDC634CFE8EE60" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_OilGasAndChemicalMember" xlink:label="loc_mtrx_OilGasAndChemicalMember_64177600A95D10CEA1AAC634CFE86907" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10" xlink:to="loc_mtrx_OilGasAndChemicalMember_64177600A95D10CEA1AAC634CFE86907" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_StorageSolutionsMember" xlink:label="loc_mtrx_StorageSolutionsMember_1AD9525EFE2EA4DA29F9C634CFE85622" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10" xlink:to="loc_mtrx_StorageSolutionsMember_1AD9525EFE2EA4DA29F9C634CFE85622" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_IndustrialMember" xlink:label="loc_mtrx_IndustrialMember_F43F55C58EDB7305648CC634CFE9983D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_879D2770CEB4A581CB1BC634CFE71D10" xlink:to="loc_mtrx_IndustrialMember_F43F55C58EDB7305648CC634CFE9983D" 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_E0BDC4AA4C904B6F9E2AC634CFE91D6F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_06B7959BF7478DDBD6A4C634CFE7BDB2" xlink:to="loc_srt_MajorCustomersAxis_E0BDC4AA4C904B6F9E2AC634CFE91D6F" 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_997F92CD2318E1942BD4C634CFE9E39A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_MajorCustomersAxis_E0BDC4AA4C904B6F9E2AC634CFE91D6F" xlink:to="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A_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_997F92CD2318E1942BD4C634CFE9E39A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_MajorCustomersAxis_E0BDC4AA4C904B6F9E2AC634CFE91D6F" xlink:to="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerOneMember" xlink:label="loc_mtrx_CustomerOneMember_E5AE666FB7F96ED23EE5C634CFEA2BBD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerOneMember_E5AE666FB7F96ED23EE5C634CFEA2BBD" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerTwoMember" xlink:label="loc_mtrx_CustomerTwoMember_CBE962EAFD2EBF7C5323C634CFEA2730" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerTwoMember_CBE962EAFD2EBF7C5323C634CFEA2730" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerThreeMember" xlink:label="loc_mtrx_CustomerThreeMember_97DF9412A523BF5D4C42C634CFEA4917" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerThreeMember_97DF9412A523BF5D4C42C634CFEA4917" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerFourMember" xlink:label="loc_mtrx_CustomerFourMember_01DA2187C539FB991AAAC634CFEAC8EC" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerFourMember_01DA2187C539FB991AAAC634CFEAC8EC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerFiveMemberMember" xlink:label="loc_mtrx_CustomerFiveMemberMember_DEA03C157BF7EC26759DC634CFEB14CF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerFiveMemberMember_DEA03C157BF7EC26759DC634CFEB14CF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerSixMember" xlink:label="loc_mtrx_CustomerSixMember_7469714FFF43C259F8E9C634CFEB7E0C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerSixMember_7469714FFF43C259F8E9C634CFEB7E0C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerSevenMember" xlink:label="loc_mtrx_CustomerSevenMember_A535BB55DC8BA0E051A7C634CFEB10F3" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerSevenMember_A535BB55DC8BA0E051A7C634CFEB10F3" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerEightMember" xlink:label="loc_mtrx_CustomerEightMember_8314C3294E5D55B19DE2C634CFEBAFA4" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerEightMember_8314C3294E5D55B19DE2C634CFEBAFA4" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerNineMember" xlink:label="loc_mtrx_CustomerNineMember_803E1F879405B1123DA2C634CFEB3A4C" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerNineMember_803E1F879405B1123DA2C634CFEB3A4C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerTenMember" xlink:label="loc_mtrx_CustomerTenMember_7F8460A621C35089590DC634CFEBBE65" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerTenMember_7F8460A621C35089590DC634CFEBBE65" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_CustomerElevenMember" xlink:label="loc_mtrx_CustomerElevenMember_3A036E7958EDE100FC0DC634CFEC168B" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_CustomerElevenMember_3A036E7958EDE100FC0DC634CFEC168B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_AnotherCustomerMember" xlink:label="loc_mtrx_AnotherCustomerMember_08DA949DC234085D82F6C634CFECA1F7" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_NameOfMajorCustomerDomain_997F92CD2318E1942BD4C634CFE9E39A" xlink:to="loc_mtrx_AnotherCustomerMember_08DA949DC234085D82F6C634CFECA1F7" 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_88BA86951494EEF760EAC634CFED3D53" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_262D3EDE6A9430AA09C3C634CFEC0765" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_88BA86951494EEF760EAC634CFED3D53" 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_766374432A9EA729CFD2C4478B36674C" 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_218D5215CCDC9D6A3083C4478B34982E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_766374432A9EA729CFD2C4478B36674C" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_218D5215CCDC9D6A3083C4478B34982E" 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_A0ED1696368622744369C4478B352D39" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_218D5215CCDC9D6A3083C4478B34982E" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_A0ED1696368622744369C4478B352D39" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_A0ED1696368622744369C4478B352D39" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_A0ED1696368622744369C4478B352D39" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_RangeThreeMember" xlink:label="loc_mtrx_RangeThreeMember_729DD37020CF8F5E75ABC4478B3543AE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96" xlink:to="loc_mtrx_RangeThreeMember_729DD37020CF8F5E75ABC4478B3543AE" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_RangeOneMember" xlink:label="loc_mtrx_RangeOneMember_BB0264D9293628B3D63EC4478B363582" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96" xlink:to="loc_mtrx_RangeOneMember_BB0264D9293628B3D63EC4478B363582" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_RangeTwoMember" xlink:label="loc_mtrx_RangeTwoMember_39B0A308F5FE0FB06D57C4478B36E471" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_FEDDE2E05DDFCFDEAA57C4478B35CD96" xlink:to="loc_mtrx_RangeTwoMember_39B0A308F5FE0FB06D57C4478B36E471" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract" xlink:label="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_766374432A9EA729CFD2C4478B36674C" xlink:to="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" 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_592B74A79FA7B6F8C79CC4478B3630E6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit_592B74A79FA7B6F8C79CC4478B3630E6" 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_F4D1072B37E59D2E4575C4478B37CBD3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit_F4D1072B37E59D2E4575C4478B37CBD3" 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_E41DF88E57BA501D4AB4C4478B372A08" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_E41DF88E57BA501D4AB4C4478B372A08" 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_2F3D3AB850B26EF6B232C4478B37E742" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1_2F3D3AB850B26EF6B232C4478B37E742" 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_093DA1BEE32854392BDEC4478B370BB6" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_093DA1BEE32854392BDEC4478B370BB6" 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_FF875D64F8B684EFE107C4478B376023" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber_FF875D64F8B684EFE107C4478B376023" 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_D3216C24544549220892C4478B3709E5" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice_D3216C24544549220892C4478B3709E5" 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_65C4AB7000A1355F4F88C4478B38A89E" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAbstract_D6BB3C6A70567234D4DCC4478B367139" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1_65C4AB7000A1355F4F88C4478B38A89E" 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_B37FF064490A6F795555CF6102B1BF7B" 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_4B9589EE682C9C95FC3CCF6102A1F45C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_4B9589EE682C9C95FC3CCF6102A1F45C" 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_9D4CCEFC82C92595F1C4CF6102A1F5EF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_4B9589EE682C9C95FC3CCF6102A1F45C" xlink:to="loc_us-gaap_PlanNameAxis_9D4CCEFC82C92595F1C4CF6102A1F5EF" 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_DF1D19AF4F30D2C4B76ECF6102A12623_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_9D4CCEFC82C92595F1C4CF6102A1F5EF" xlink:to="loc_us-gaap_PlanNameDomain_DF1D19AF4F30D2C4B76ECF6102A12623_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_DF1D19AF4F30D2C4B76ECF6102A12623" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_9D4CCEFC82C92595F1C4CF6102A1F5EF" xlink:to="loc_us-gaap_PlanNameDomain_DF1D19AF4F30D2C4B76ECF6102A12623" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember_80BC16D8BD32B5BB8607CF6102A1C429" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_DF1D19AF4F30D2C4B76ECF6102A12623" xlink:to="loc_mtrx_MatrixServiceCompanys2004StockandIncentiveCompensationPlanMember_80BC16D8BD32B5BB8607CF6102A1C429" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember_873A822C49925E4610B1CF6102A120FC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_DF1D19AF4F30D2C4B76ECF6102A12623" xlink:to="loc_mtrx_MatrixServiceCompanys2012StockandIncentiveCompensationPlanMember_873A822C49925E4610B1CF6102A120FC" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember" xlink:label="loc_mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember_0CEC8B9998A32E10EC24CF6102A17B79" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_DF1D19AF4F30D2C4B76ECF6102A12623" xlink:to="loc_mtrx_MatrixServiceCompany2016StockandIncentiveCompensationPlanMember_0CEC8B9998A32E10EC24CF6102A17B79" 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_8B9972F1E3BE72D735A6CF6102A12034" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_4B9589EE682C9C95FC3CCF6102A1F45C" xlink:to="loc_us-gaap_AwardTypeAxis_8B9972F1E3BE72D735A6CF6102A12034" 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_F876793FC3E35B9A8557CF6102A1873F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_8B9972F1E3BE72D735A6CF6102A12034" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F_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_F876793FC3E35B9A8557CF6102A1873F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_8B9972F1E3BE72D735A6CF6102A12034" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MarketBasedAwardsMember" xlink:label="loc_mtrx_MarketBasedAwardsMember_08DEF1EF164D6A446DF5CF6102A1D2EA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_MarketBasedAwardsMember_08DEF1EF164D6A446DF5CF6102A1D2EA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Vestin2016Member" xlink:label="loc_mtrx_Vestin2016Member_E022A5C359A741E69390CF6102A1C966" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_Vestin2016Member_E022A5C359A741E69390CF6102A1C966" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Vestin2017Member" xlink:label="loc_mtrx_Vestin2017Member_25CC55C249200A0C58EACF6102A13EBF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_Vestin2017Member_25CC55C249200A0C58EACF6102A13EBF" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Vestin2018Member" xlink:label="loc_mtrx_Vestin2018Member_64D80143655EECCF25FDCF6102A1A0E7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_Vestin2018Member_64D80143655EECCF25FDCF6102A1A0E7" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Vestin2019Member" xlink:label="loc_mtrx_Vestin2019Member_CEFF171E03AC8C0159A9CF6102A13B4B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_Vestin2019Member_CEFF171E03AC8C0159A9CF6102A13B4B" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_Vestin2020Member" xlink:label="loc_mtrx_Vestin2020Member_1DE4FB8F76A176255D77CF6102A1CDEC" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F876793FC3E35B9A8557CF6102A1873F" xlink:to="loc_mtrx_Vestin2020Member_1DE4FB8F76A176255D77CF6102A1CDEC" 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_3B4281680D7551FB66ADCF6102A1E8E2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_4B9589EE682C9C95FC3CCF6102A1F45C" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_3B4281680D7551FB66ADCF6102A1E8E2" 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_5A6774C183E0E45DB9C3CF6102B11696_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_3B4281680D7551FB66ADCF6102A1E8E2" xlink:to="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_5A6774C183E0E45DB9C3CF6102B11696_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_5A6774C183E0E45DB9C3CF6102B11696" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DeferredCompensationArrangementWithIndividualShareBasedPaymentsByTypeOfDeferredCompensationAxis_3B4281680D7551FB66ADCF6102A1E8E2" xlink:to="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_5A6774C183E0E45DB9C3CF6102B11696" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_EmployeeAwardMember" xlink:label="loc_mtrx_EmployeeAwardMember_1A0885591723846F26E6CF6102B1524F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityBasedArrangementsIndividualContractsTypeOfDeferredCompensationDomain_5A6774C183E0E45DB9C3CF6102B11696" xlink:to="loc_mtrx_EmployeeAwardMember_1A0885591723846F26E6CF6102B1524F" 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_83899D4C36C6636C94CACF6102B1B3E8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_4B9589EE682C9C95FC3CCF6102A1F45C" xlink:to="loc_srt_RangeAxis_83899D4C36C6636C94CACF6102B1B3E8" 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_E3C574FF1E0FC42C06C3CF6102B17962_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_83899D4C36C6636C94CACF6102B1B3E8" xlink:to="loc_srt_RangeMember_E3C574FF1E0FC42C06C3CF6102B17962_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_E3C574FF1E0FC42C06C3CF6102B17962" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_83899D4C36C6636C94CACF6102B1B3E8" xlink:to="loc_srt_RangeMember_E3C574FF1E0FC42C06C3CF6102B17962" 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_BF63B0D0CD54043888C3CF6102B10ACE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_E3C574FF1E0FC42C06C3CF6102B17962" xlink:to="loc_srt_MinimumMember_BF63B0D0CD54043888C3CF6102B10ACE" 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_F5E7F30EDFB753CE5061CF6102B1C2DB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_E3C574FF1E0FC42C06C3CF6102B17962" xlink:to="loc_srt_MaximumMember_F5E7F30EDFB753CE5061CF6102B1C2DB" 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_F02B1E5BFFD32BE7EE58CF6102B1E95B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensation_F02B1E5BFFD32BE7EE58CF6102B1E95B" 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_0E624E41925C6A967413CF6102B192B0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_0E624E41925C6A967413CF6102B192B0" 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_2E54D455EED31FB5542BCF6102B117D1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_2E54D455EED31FB5542BCF6102B117D1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_1A53D8F1FF886EAC7C35CF6102B1187A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_1A53D8F1FF886EAC7C35CF6102B1187A" 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_7B77448730D55B2383E9CF6102B1360B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_7B77448730D55B2383E9CF6102B1360B" 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_A3A7721893DC96FC9AA9CF6102B1EB0C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_A3A7721893DC96FC9AA9CF6102B1EB0C" 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_B226DD1BECFFBB076DE5CF6102B1D1F6" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_B226DD1BECFFBB076DE5CF6102B1D1F6" 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_61249E5FCA871DABB7E6CF6102B11A46" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_61249E5FCA871DABB7E6CF6102B11A46" 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_54DAD5DE5F660C449A8BCF6102B1568D" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_54DAD5DE5F660C449A8BCF6102B1568D" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting_A2886973BC9286CA3E3DCF6102B17D60" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardInstallmentPeriodForVesting_A2886973BC9286CA3E3DCF6102B17D60" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards_EE3B2C8F954CDDCD0E0CCF6102B10CB0" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriodOfDirectorAwards_EE3B2C8F954CDDCD0E0CCF6102B10CB0" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards_E46963BA1A91E0B5CA55CF6102B18750" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardDescriptionofVestingPeriodofDirectorAwards_E46963BA1A91E0B5CA55CF6102B18750" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PayoutAsPercentageOfOriginalAwardMinimum" xlink:label="loc_mtrx_PayoutAsPercentageOfOriginalAwardMinimum_07E572B9BE3442236757CF6102B1EF7E" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_PayoutAsPercentageOfOriginalAwardMinimum_07E572B9BE3442236757CF6102B1EF7E" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_PayoutAsPercentageOfOriginalAwardMaximum" xlink:label="loc_mtrx_PayoutAsPercentageOfOriginalAwardMaximum_0C436F6E30ED7A0038FFCF6102B1BF79" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_PayoutAsPercentageOfOriginalAwardMaximum_0C436F6E30ED7A0038FFCF6102B1BF79" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares" xlink:label="loc_mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares_679D11FAFF6BF23F1448CF6102B1EB0A" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_MinimumThresholdSharesScheduledToVestForPerformanceBasedShares_679D11FAFF6BF23F1448CF6102B1EB0A" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod_9503E376EFC22AEAEC20CF6102B1D8E8" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredGrantsInPeriod_9503E376EFC22AEAEC20CF6102B1D8E8" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue_A745AD718C73EBF69450CF6102B19283" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredWeightedAverageGrantDateFairValue_A745AD718C73EBF69450CF6102B19283" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased_E3F90517F556FC0A126FCF6102B14BC6" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleased_E3F90517F556FC0A126FCF6102B14BC6" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue_B2EB7F1A6BAAC3445218CF6102B1954D" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardDeferredSharesVestedAndReleasedWeightedAverageGrantDateFairValue_B2EB7F1A6BAAC3445218CF6102B1954D" 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_783739B908FAAD25F03ECF6102B1E35F" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsMethodUsed_783739B908FAAD25F03ECF6102B1E35F" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed" xlink:label="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed_A64B9755BAC3E3C5DE65CF6102B1DCE3" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_B37FF064490A6F795555CF6102B1BF7B" xlink:to="loc_mtrx_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueMethodNumberofSimulationsUsed_A64B9755BAC3E3C5DE65CF6102B1DCE3" 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_974AFBC93189631A72D6C4478B5D1A18" 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_A214A81D245F5BBDE19FC4478B5C9972" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_974AFBC93189631A72D6C4478B5D1A18" xlink:to="loc_us-gaap_ClassOfTreasuryStockTable_A214A81D245F5BBDE19FC4478B5C9972" 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_A7F81A0DEDF9EF84A6C4C4478B5CF268" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_A214A81D245F5BBDE19FC4478B5C9972" xlink:to="loc_us-gaap_StatementClassOfStockAxis_A7F81A0DEDF9EF84A6C4C4478B5CF268" 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_5B9E14AB31521B48465DC4478B5CBE38_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_A7F81A0DEDF9EF84A6C4C4478B5CF268" xlink:to="loc_us-gaap_ClassOfStockDomain_5B9E14AB31521B48465DC4478B5CBE38_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_5B9E14AB31521B48465DC4478B5CBE38" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_A7F81A0DEDF9EF84A6C4C4478B5CF268" xlink:to="loc_us-gaap_ClassOfStockDomain_5B9E14AB31521B48465DC4478B5CBE38" 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_DF95DADC03F5F9B3A595C4478B5DE78F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_A214A81D245F5BBDE19FC4478B5C9972" xlink:to="loc_us-gaap_ShareRepurchaseProgramAxis_DF95DADC03F5F9B3A595C4478B5DE78F" 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_115BDD341F14C385AA96C4478B5D0944_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_DF95DADC03F5F9B3A595C4478B5DE78F" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_115BDD341F14C385AA96C4478B5D0944_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_115BDD341F14C385AA96C4478B5D0944" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_DF95DADC03F5F9B3A595C4478B5DE78F" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_115BDD341F14C385AA96C4478B5D0944" 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_C2E5955C8015BB82DE67C4478B5DB92F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_974AFBC93189631A72D6C4478B5D1A18" xlink:to="loc_us-gaap_StockRepurchaseProgramExpirationDate_C2E5955C8015BB82DE67C4478B5DB92F" 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_14AC83BFBC50A7EF0F98C4478C766AB9" 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_DEA156D0614D169406AEC4478C72D191" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_14AC83BFBC50A7EF0F98C4478C766AB9" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_DEA156D0614D169406AEC4478C72D191" 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_718182CD7395015DC841C4478C73E58E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_DEA156D0614D169406AEC4478C72D191" xlink:to="loc_srt_StatementGeographicalAxis_718182CD7395015DC841C4478C73E58E" 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_5EC0E1C7DA43C199C9DCC4478C733C16_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_718182CD7395015DC841C4478C73E58E" xlink:to="loc_srt_SegmentGeographicalDomain_5EC0E1C7DA43C199C9DCC4478C733C16_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_5EC0E1C7DA43C199C9DCC4478C733C16" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_718182CD7395015DC841C4478C73E58E" xlink:to="loc_srt_SegmentGeographicalDomain_5EC0E1C7DA43C199C9DCC4478C733C16" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_InternationalMember" xlink:label="loc_mtrx_InternationalMember_6F281F096693C226490BC4478C7380CB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_5EC0E1C7DA43C199C9DCC4478C733C16" xlink:to="loc_mtrx_InternationalMember_6F281F096693C226490BC4478C7380CB" 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_449E3805DA1F8769759DC4478C73E293" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_DEA156D0614D169406AEC4478C72D191" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_449E3805DA1F8769759DC4478C73E293" 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_9C0320BB05550C8A0685C4478C74F377_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_449E3805DA1F8769759DC4478C73E293" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377_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_9C0320BB05550C8A0685C4478C74F377" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_449E3805DA1F8769759DC4478C73E293" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377" 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_28AAA0887476D59B4D70C4478C743EAA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377" xlink:to="loc_us-gaap_BuildingMember_28AAA0887476D59B4D70C4478C743EAA" 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_8FDCC5240D54CF861726C4478C748648" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377" xlink:to="loc_us-gaap_EquipmentMember_8FDCC5240D54CF861726C4478C748648" 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_4802505C39D17C126B09C4478C744A62" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377" xlink:to="loc_us-gaap_TransportationEquipmentMember_4802505C39D17C126B09C4478C744A62" 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_82252B633049AD66758BC4478C75EF4F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_9C0320BB05550C8A0685C4478C74F377" xlink:to="loc_us-gaap_FurnitureAndFixturesMember_82252B633049AD66758BC4478C75EF4F" 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_1F3087B6E187CD39E8FDC4478C75C8F3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_DEA156D0614D169406AEC4478C72D191" xlink:to="loc_srt_RangeAxis_1F3087B6E187CD39E8FDC4478C75C8F3" 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_335C44BA7AFAB6F2BD6DC4478C75AF83_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_1F3087B6E187CD39E8FDC4478C75C8F3" xlink:to="loc_srt_RangeMember_335C44BA7AFAB6F2BD6DC4478C75AF83_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_335C44BA7AFAB6F2BD6DC4478C75AF83" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_1F3087B6E187CD39E8FDC4478C75C8F3" xlink:to="loc_srt_RangeMember_335C44BA7AFAB6F2BD6DC4478C75AF83" 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_C33AE6EFEE734BA3E203C4478C75360C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_335C44BA7AFAB6F2BD6DC4478C75AF83" xlink:to="loc_srt_MinimumMember_C33AE6EFEE734BA3E203C4478C75360C" 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_0D93344286E4154FF602C4478C7686CE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_335C44BA7AFAB6F2BD6DC4478C75AF83" xlink:to="loc_srt_MaximumMember_0D93344286E4154FF602C4478C7686CE" 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_7C2A7A41913AA5825CEDC4478C765CB4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_14AC83BFBC50A7EF0F98C4478C766AB9" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_7C2A7A41913AA5825CEDC4478C765CB4" 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_F871F8F8EA66E174D643C4478C765A64" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_14AC83BFBC50A7EF0F98C4478C766AB9" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_F871F8F8EA66E174D643C4478C765A64" 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_D75FA5E577C957FC628AC4478C76E027" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_14AC83BFBC50A7EF0F98C4478C766AB9" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_D75FA5E577C957FC628AC4478C76E027" 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_9C6E6055C527CCED8AB3C4478C76B526" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_14AC83BFBC50A7EF0F98C4478C766AB9" xlink:to="loc_us-gaap_Cash_9C6E6055C527CCED8AB3C4478C76B526" 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_C57F21DB40BA4BBC7F42CF5E9C15A35A" 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_D906D122553C9BC95373CF5E9C109515" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_C57F21DB40BA4BBC7F42CF5E9C15A35A" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_D906D122553C9BC95373CF5E9C109515" 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_DDFF95EDE6038437716ACF5E9C123614" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_D906D122553C9BC95373CF5E9C109515" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_DDFF95EDE6038437716ACF5E9C123614" 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_775D794FA753ADDADD26CF5E9C12BF7C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_DDFF95EDE6038437716ACF5E9C123614" xlink:to="loc_us-gaap_TypeOfAdoptionMember_775D794FA753ADDADD26CF5E9C12BF7C_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_775D794FA753ADDADD26CF5E9C12BF7C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_DDFF95EDE6038437716ACF5E9C123614" xlink:to="loc_us-gaap_TypeOfAdoptionMember_775D794FA753ADDADD26CF5E9C12BF7C" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_DeferredTaxAssetImpactMember" xlink:label="loc_mtrx_DeferredTaxAssetImpactMember_41A33D9114FA1C72886DCF5E9C13BAAA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_775D794FA753ADDADD26CF5E9C12BF7C" xlink:to="loc_mtrx_DeferredTaxAssetImpactMember_41A33D9114FA1C72886DCF5E9C13BAAA" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_DeferredTaxesImpactLiabilitiesMember" xlink:label="loc_mtrx_DeferredTaxesImpactLiabilitiesMember_E607BFA7E7B3087824C9CF5E9C137721" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_775D794FA753ADDADD26CF5E9C12BF7C" xlink:to="loc_mtrx_DeferredTaxesImpactLiabilitiesMember_E607BFA7E7B3087824C9CF5E9C137721" 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_2C5DF7B189148588678FCF5E9C14EA32" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_D906D122553C9BC95373CF5E9C109515" xlink:to="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_2C5DF7B189148588678FCF5E9C14EA32" 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_CE3E874D6A156E593357CF5E9C146D98_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_2C5DF7B189148588678FCF5E9C14EA32" xlink:to="loc_us-gaap_ChangeInAccountingPrincipleMember_CE3E874D6A156E593357CF5E9C146D98_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_CE3E874D6A156E593357CF5E9C146D98" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis_2C5DF7B189148588678FCF5E9C14EA32" xlink:to="loc_us-gaap_ChangeInAccountingPrincipleMember_CE3E874D6A156E593357CF5E9C146D98" 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_6358FEBBE50113DB3617CF5E9C142541" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_D906D122553C9BC95373CF5E9C109515" xlink:to="loc_us-gaap_StatementScenarioAxis_6358FEBBE50113DB3617CF5E9C142541" 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_3DBD95BF563CDBF0AF54CF5E9C141DA4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_6358FEBBE50113DB3617CF5E9C142541" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_3DBD95BF563CDBF0AF54CF5E9C141DA4_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_3DBD95BF563CDBF0AF54CF5E9C141DA4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_6358FEBBE50113DB3617CF5E9C142541" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_3DBD95BF563CDBF0AF54CF5E9C141DA4" 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_7FF58507B6AFD276FC30CF5E9C15B498" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_C57F21DB40BA4BBC7F42CF5E9C15A35A" xlink:to="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleEffectOfAdoptionQuantification_7FF58507B6AFD276FC30CF5E9C15B498" xlink:type="arc" />
    <link:loc xlink:href="mtrx-20180630.xsd#mtrx_EffectofadoptionofnewaccountingstandardcomparedtooldstandardEPS" xlink:label="loc_mtrx_EffectofadoptionofnewaccountingstandardcomparedtooldstandardEPS_0D908C68CC8E178FE7E9CF5E9C15DBEB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_C57F21DB40BA4BBC7F42CF5E9C15A35A" xlink:to="loc_mtrx_EffectofadoptionofnewaccountingstandardcomparedtooldstandardEPS_0D908C68CC8E178FE7E9CF5E9C15DBEB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleDescriptionOfPriorperiodInformationRetrospectivelyAdjusted" xlink:label="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleDescriptionOfPriorperiodInformationRetrospectivelyAdjusted_E98CA1E370FF4EA17DC5CF5E9C1560A4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_C57F21DB40BA4BBC7F42CF5E9C15A35A" xlink:to="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleDescriptionOfPriorperiodInformationRetrospectivelyAdjusted_E98CA1E370FF4EA17DC5CF5E9C1560A4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAdditionalCapital" xlink:label="loc_us-gaap_OtherAdditionalCapital_6600F1B3EE26D4C27516CF5E9C16E7E1" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_C57F21DB40BA4BBC7F42CF5E9C15A35A" xlink:to="loc_us-gaap_OtherAdditionalCapital_6600F1B3EE26D4C27516CF5E9C16E7E1" 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_02FD4A4983E8E2185FB5C4478A92C302" 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_7A6024F44DD984EACFC3C4478A91FED4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_02FD4A4983E8E2185FB5C4478A92C302" xlink:to="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_7A6024F44DD984EACFC3C4478A91FED4" 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_D7870BEA3737A29A3D74C4478A91E32C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureTable_7A6024F44DD984EACFC3C4478A91FED4" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_D7870BEA3737A29A3D74C4478A91E32C" 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_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_D7870BEA3737A29A3D74C4478A91E32C" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38_default" 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" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_D7870BEA3737A29A3D74C4478A91E32C" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38" 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_E1608186E0239EA00704C4478A92148F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38" xlink:to="loc_us-gaap_AllowanceForCreditLossMember_E1608186E0239EA00704C4478A92148F" 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_2AEE4F8E08EAFAE5008BC4478A9274B5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_ED9A2802230B3161217FC4478A910E38" xlink:to="loc_us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember_2AEE4F8E08EAFAE5008BC4478A9274B5" 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_28AF9EA1EE08BFC842EFC4478A92A091" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ValuationAndQualifyingAccountsDisclosureLineItems_02FD4A4983E8E2185FB5C4478A92C302" xlink:to="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_28AF9EA1EE08BFC842EFC4478A92A091" 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_F1124CDE12E258C45417C4478A926CA7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_28AF9EA1EE08BFC842EFC4478A92A091" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesBalance_F1124CDE12E258C45417C4478A926CA7" 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_C90A760211BD8197E50EC4478A93565E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_28AF9EA1EE08BFC842EFC4478A92A091" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense_C90A760211BD8197E50EC4478A93565E" 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_9E3BDC54E70ABFD9E15AC4478A932FA9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_28AF9EA1EE08BFC842EFC4478A92A091" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts_9E3BDC54E70ABFD9E15AC4478A932FA9" 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_3F30F938F117A7C1F0ADC4478A93784A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_28AF9EA1EE08BFC842EFC4478A92A091" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDeductions_3F30F938F117A7C1F0ADC4478A93784A" xlink:type="arc" />
  </link:definitionLink>
</link:linkbase>
