<XBRL>
<?xml version="1.0" encoding="US-ASCII"?>
<!-- Generated by iC(tm) - CompSci Interactive Converter - http://www.compsciresources.com -->
<!-- Created: Thu Mar 28 12:55:04 EDT 2019 -->
<linkbase xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:xbrldt="http://xbrl.org/2005/xbrldt">
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ConsolidatedBalanceSheet" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ConsolidatedBalanceSheet_Parentheticals" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ConsolidatedIncomeStatement" roleURI="http://www.rexamerican.com/role/ConsolidatedIncomeStatement"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ShareholdersEquityType2or3" roleURI="http://www.rexamerican.com/role/ShareholdersEquityType2or3"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ConsolidatedCashFlow" roleURI="http://www.rexamerican.com/role/ConsolidatedCashFlow"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_INVESTMENTS" roleURI="http://www.rexamerican.com/role/INVESTMENTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_NETSALESANDREVENUE" roleURI="http://www.rexamerican.com/role/NETSALESANDREVENUE"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_BUSINESSCOMBINATIONS" roleURI="http://www.rexamerican.com/role/BUSINESSCOMBINATIONS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_FAIRVALUE" roleURI="http://www.rexamerican.com/role/FAIRVALUE"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_OTHERASSETS" roleURI="http://www.rexamerican.com/role/OTHERASSETS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES" roleURI="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_LEASES" roleURI="http://www.rexamerican.com/role/LEASES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_COMMONSTOCK" roleURI="http://www.rexamerican.com/role/COMMONSTOCK"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_REVOLVINGLINESOFCREDIT" roleURI="http://www.rexamerican.com/role/REVOLVINGLINESOFCREDIT"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTS" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_EMPLOYEEBENEFITS" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_Commitments" roleURI="http://www.rexamerican.com/role/Commitments"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_IncomeTaxes" roleURI="http://www.rexamerican.com/role/IncomeTaxes"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_CONTINGENCIES" roleURI="http://www.rexamerican.com/role/CONTINGENCIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SegmentReporting" roleURI="http://www.rexamerican.com/role/SegmentReporting"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_QUARTERLYUNAUDITEDINFORMATION" roleURI="http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATION"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_RELATEDPARTIES" roleURI="http://www.rexamerican.com/role/RELATEDPARTIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS" roleURI="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_AccountingPoliciesByPolicy" roleURI="http://www.rexamerican.com/role/AccountingPoliciesByPolicy"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_INVESTMENTSTables" roleURI="http://www.rexamerican.com/role/INVESTMENTSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_BUSINESSCOMBINATIONSTables" roleURI="http://www.rexamerican.com/role/BUSINESSCOMBINATIONSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_FAIRVALUETables" roleURI="http://www.rexamerican.com/role/FAIRVALUETables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_OTHERASSETSTables" roleURI="http://www.rexamerican.com/role/OTHERASSETSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables" roleURI="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_LEASESTables" roleURI="http://www.rexamerican.com/role/LEASESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_COMMONSTOCKTables" roleURI="http://www.rexamerican.com/role/COMMONSTOCKTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTSTables" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_EMPLOYEEBENEFITSTables" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_IncomeTaxesTables" roleURI="http://www.rexamerican.com/role/IncomeTaxesTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SegmentReportingTables" roleURI="http://www.rexamerican.com/role/SegmentReportingTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_QUARTERLYUNAUDITEDINFORMATIONTables" roleURI="http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATIONTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofcomponentsofBasisofPresentationTable" roleURI="http://www.rexamerican.com/role/ScheduleofcomponentsofBasisofPresentationTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofcomponentsofinventoryTable" roleURI="http://www.rexamerican.com/role/ScheduleofcomponentsofinventoryTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofPropertyPlantandEquipmentTable" roleURI="http://www.rexamerican.com/role/ScheduleofPropertyPlantandEquipmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofEquityMethodInvestmentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofCondensedBalanceSheetTable" roleURI="http://www.rexamerican.com/role/ScheduleofCondensedBalanceSheetTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofFinancialinformationForEquityMethodInvestmentTable" roleURI="http://www.rexamerican.com/role/ScheduleofFinancialinformationForEquityMethodInvestmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofheldtomaturitysecurityTable" roleURI="http://www.rexamerican.com/role/ScheduleofheldtomaturitysecurityTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofEstimatedFairValuesofAssetsAcquiredatAcquisitionDateTable" roleURI="http://www.rexamerican.com/role/ScheduleofEstimatedFairValuesofAssetsAcquiredatAcquisitionDateTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" roleURI="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofOtherAssetsTable" roleURI="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofaccruedexpensesandothercurrentliabilitiesTable" roleURI="http://www.rexamerican.com/role/ScheduleofaccruedexpensesandothercurrentliabilitiesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofFutureMinimumRentalPaymentsforOperatingLeasesTable" roleURI="http://www.rexamerican.com/role/ScheduleofFutureMinimumRentalPaymentsforOperatingLeasesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofCommonStockTable" roleURI="http://www.rexamerican.com/role/ScheduleofCommonStockTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofFairValuesforDerivativeFinancialInstrumentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofFairValuesforDerivativeFinancialInstrumentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofNonVestedRestrictedStockAwardActivityTable" roleURI="http://www.rexamerican.com/role/ScheduleofNonVestedRestrictedStockAwardActivityTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofUnrecognizedTaxBenefitsRollForwardTable" roleURI="http://www.rexamerican.com/role/ScheduleofUnrecognizedTaxBenefitsRollForwardTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofDeferredTaxAssetsandLiabilitiesTable" roleURI="http://www.rexamerican.com/role/ScheduleofDeferredTaxAssetsandLiabilitiesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofEffectiveIncomeTaxReconciliationTable" roleURI="http://www.rexamerican.com/role/ScheduleofEffectiveIncomeTaxReconciliationTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofUnrecognizedTaxBenefitsRollForwardTable0" roleURI="http://www.rexamerican.com/role/ScheduleofUnrecognizedTaxBenefitsRollForwardTable0"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleOfSegmentResultsAndAssetsTable" roleURI="http://www.rexamerican.com/role/ScheduleOfSegmentResultsAndAssetsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleOfSegmentAssetsTable" roleURI="http://www.rexamerican.com/role/ScheduleOfSegmentAssetsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_ScheduleofQuarterlyFinancialInformationTable" roleURI="http://www.rexamerican.com/role/ScheduleofQuarterlyFinancialInformationTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_VALUATIONANDQUALIFYINGACCOUNTSTable" roleURI="http://www.rexamerican.com/role/VALUATIONANDQUALIFYINGACCOUNTSTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_INVESTMENTSDetails" roleURI="http://www.rexamerican.com/role/INVESTMENTSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_BUSINESSCOMBINATIONSDetails" roleURI="http://www.rexamerican.com/role/BUSINESSCOMBINATIONSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_COMMONSTOCKDetails" roleURI="http://www.rexamerican.com/role/COMMONSTOCKDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_REVOLVINGLINESOFCREDITDetails" roleURI="http://www.rexamerican.com/role/REVOLVINGLINESOFCREDITDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTSDetails" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_EMPLOYEEBENEFITSDetails" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_CommitmentsDetails" roleURI="http://www.rexamerican.com/role/CommitmentsDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_IncomeTaxesDetails" roleURI="http://www.rexamerican.com/role/IncomeTaxesDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_SegmentReportingDetails" roleURI="http://www.rexamerican.com/role/SegmentReportingDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#rex_r_RELATEDPARTIESDetails" roleURI="http://www.rexamerican.com/role/RELATEDPARTIESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20190131.xsd#DocumentAndEntityInformation" roleURI="http://www.rexamerican.com/role/DocumentAndEntityInformation"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" arcroleURI="http://xbrl.org/int/dim/arcrole/all"/>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementScenarioAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementScenarioAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrentAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrentAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AssetsCurrentAbstract" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_CashAndCashEquivalentsAtCarryingValue" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedCashCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedCashCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_RestrictedCashCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShortTermInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_ShortTermInvestments" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_InventoryNet" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesReceivable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_IncomeTaxesReceivable" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_AssetsCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_OtherAssetsNoncurrent" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsCurrentAbstract" xlink:to="us-gaap_EquityMethodInvestments" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_Assets" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrentAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_LiabilitiesCurrentAbstract" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableTradeCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesCurrentAbstract" xlink:to="us-gaap_AccountsPayableTradeCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesCurrentAbstract" xlink:to="us-gaap_OtherLiabilitiesCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherLiabilitiesCurrent" xlink:to="us-gaap_LiabilitiesCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_LongTermLiabilitiesAbstract" xlink:href="rex-20190131.xsd#rex_LongTermLiabilitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_LongTermLiabilitiesAbstract" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilitiesNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_LongTermLiabilitiesAbstract" xlink:to="us-gaap_DeferredTaxLiabilitiesNoncurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_LongTermLiabilitiesAbstract" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherLiabilitiesNoncurrent" xlink:to="us-gaap_LiabilitiesNoncurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_EquityAbstract" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_CommonStockValue" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalCommonStock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_AdditionalPaidInCapitalCommonStock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_TreasuryStockValue" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_StockholdersEquity" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MinorityInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_MinorityInterest" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_MinorityInterest" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAndStockholdersEquity" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_LiabilitiesAndStockholdersEquity" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementScenarioAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementScenarioAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesAuthorized" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockSharesAuthorized" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesIssued" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockSharesIssued" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockShares" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockShares"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockShares" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ConsolidatedIncomeStatement">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementScenarioAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementScenarioAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_Revenues" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_GrossProfit" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpense" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpense" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InterestAndOtherIncome" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestAndOtherIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_InterestAndOtherIncome" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ProfitLoss" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NetIncomeLoss" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfShareOutstandingBasicAndDiluted" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfShareOutstandingBasicAndDiluted"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_WeightedAverageNumberOfShareOutstandingBasicAndDiluted" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasicAndDiluted" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EarningsPerShareBasicAndDiluted"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_EarningsPerShareBasicAndDiluted" order="13" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ShareholdersEquityType2or3">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_TreasuryStockMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AdditionalPaidInCapitalMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_RetainedEarningsMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NoncontrollingInterestMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NoncontrollingInterestMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_NoncontrollingInterestMember" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharesOutstanding" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SharesOutstanding" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ProfitLoss" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromContributionsFromAffiliates" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromContributionsFromAffiliates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ProceedsFromContributionsFromAffiliates" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockValueAcquiredCostMethod" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockSharesAcquired" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockSharesAcquired" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ConsolidatedCashFlow">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementScenarioAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementScenarioAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScenarioUnspecifiedDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementScenarioAxis" xlink:to="us-gaap_ScenarioUnspecifiedDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:href="rex-20190131.xsd#rex_CashFlowsFromOperatingActivitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CashFlowsFromOperatingActivitiesAbstract" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_ProfitLoss" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationDepletionAndAmortization" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_DepreciationDepletionAndAmortization" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AllocatedShareBasedCompensationExpense" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_AllocatedShareBasedCompensationExpense" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentDividendsOrDistributions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentDividendsOrDistributions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_EquityMethodInvestmentDividendsOrDistributions" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromInterestAndDividendsReceived" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromInterestAndDividendsReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromInterestAndDividendsReceived" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_GainLossOnInvestments" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_GainOnDisposalOfRealEstateAndPropertyAndEquipment" xlink:href="rex-20190131.xsd#rex_GainOnDisposalOfRealEstateAndPropertyAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="rex_GainOnDisposalOfRealEstateAndPropertyAndEquipment" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:href="rex-20190131.xsd#rex_ChangesInAssetsAndLiabilitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromOperatingActivitiesAbstract" xlink:to="rex_ChangesInAssetsAndLiabilitiesAbstract" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsReceivable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsReceivable" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInInventories" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInInventories" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsPayableTrade" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableTrade"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsPayableTrade" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ChangesInAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:to="us-gaap_NetCashProvidedByUsedInOperatingActivities" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:href="rex-20190131.xsd#rex_CashFlowsFromInvestingActivitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CashFlowsFromInvestingActivitiesAbstract" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireShortTermInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_PaymentsToAcquireShortTermInvestments" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromSaleOfShortTermInvestments" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfLongtermInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfLongtermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromSaleOfLongtermInvestments" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromCollectionOfNotesReceivable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromCollectionOfNotesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromCollectionOfNotesReceivable" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfRestrictedInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfRestrictedInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromInvestingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromSaleOfRestrictedInvestments" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProceedsFromSaleOfRestrictedInvestments" xlink:to="us-gaap_NetCashProvidedByUsedInInvestingActivities" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashFlowsFromFinancingActivitiesAbstract" xlink:href="rex-20190131.xsd#rex_CashFlowsFromFinancingActivitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CashFlowsFromFinancingActivitiesAbstract" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToMinorityShareholders" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToMinorityShareholders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromFinancingActivitiesAbstract" xlink:to="us-gaap_PaymentsToMinorityShareholders" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromContributionsFromAffiliates" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromContributionsFromAffiliates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromFinancingActivitiesAbstract" xlink:to="us-gaap_ProceedsFromContributionsFromAffiliates" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CashFlowsFromFinancingActivitiesAbstract" xlink:to="us-gaap_PaymentsForRepurchaseOfCommonStock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:to="us-gaap_NetCashProvidedByUsedInFinancingActivities" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashFinancingActivitiesEquityAwardsIssued" xlink:href="rex-20190131.xsd#rex_NonCashFinancingActivitiesEquityAwardsIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_NonCashFinancingActivitiesEquityAwardsIssued" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashFinancingActivitiesEquityAwardsAccrued" xlink:href="rex-20190131.xsd#rex_NonCashFinancingActivitiesEquityAwardsAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_NonCashFinancingActivitiesEquityAwardsAccrued" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" xlink:href="rex-20190131.xsd#rex_NonCashInvestingActivitiesAccruedCapitalExpenditures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashAndCashEquivalents" xlink:href="rex-20190131.xsd#rex_CashAndCashEquivalents"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CashAndCashEquivalents" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedCashCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedCashCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RestrictedCashCurrent" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue" order="11" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SignificantAccountingPoliciesTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SignificantAccountingPoliciesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SignificantAccountingPoliciesTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/INVESTMENTS">
    <loc xlink:type="locator" xlink:label="invest_InvestmentsScheduleAbstract" xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_InvestmentsScheduleAbstract"/>
    <loc xlink:type="locator" xlink:label="invest_InvestmentTextBlock" xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_InvestmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="invest_InvestmentsScheduleAbstract" xlink:to="invest_InvestmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/NETSALESANDREVENUE">
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueFromContractWithCustomerAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueFromContractWithCustomerTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:to="us-gaap_RevenueFromContractWithCustomerTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/BUSINESSCOMBINATIONS">
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessCombinationsAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessCombinationDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BusinessCombinationsAbstract" xlink:to="us-gaap_BusinessCombinationDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/FAIRVALUE">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueDisclosuresTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_FairValueDisclosuresTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/OTHERASSETS">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_OtherAssetsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/LEASES">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesOfLesseeDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeasesOfLesseeDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LeasesOfLesseeDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/COMMONSTOCK">
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityNoteAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityNoteDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StockholdersEquityNoteAbstract" xlink:to="us-gaap_StockholdersEquityNoteDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/REVOLVINGLINESOFCREDIT">
    <loc xlink:type="locator" xlink:label="us-gaap_DebtDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtDisclosureAbstract" xlink:to="us-gaap_DebtDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITS">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CompensationAndEmployeeBenefitPlansTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/Commitments">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommitmentsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_CommitmentsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/IncomeTaxes">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/CONTINGENCIES">
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingencyAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LossContingencyAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingencyDisclosures" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LossContingencyDisclosures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LossContingencyAbstract" xlink:to="us-gaap_LossContingencyDisclosures" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SegmentReporting">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_SegmentReportingDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATION">
    <loc xlink:type="locator" xlink:label="us-gaap_QuarterlyFinancialInformationDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_QuarterlyFinancialInformationDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_QuarterlyFinancialInformationTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_QuarterlyFinancialInformationTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_QuarterlyFinancialInformationDisclosureAbstract" xlink:to="us-gaap_QuarterlyFinancialInformationTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/RELATEDPARTIES">
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyTransactionsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyTransactionsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionsAbstract" xlink:to="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS">
    <loc xlink:type="locator" xlink:label="srt_ValuationAndQualifyingAccountsAbstract" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ValuationAndQualifyingAccountsAbstract"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ValuationAndQualifyingAccountsAbstract" xlink:to="srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/AccountingPoliciesByPolicy">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidationPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConsolidationPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ConsolidationPolicyTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FiscalPeriod" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiscalPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_FiscalPeriod" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingPolicyPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingPolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SegmentReportingPolicyPolicyTextBlock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UseOfEstimates" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UseOfEstimates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_UseOfEstimates" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CashAndCashEquivalentsPolicyTextBlock" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskCreditRisk" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskCreditRisk"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ConcentrationRiskCreditRisk" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryPolicyTextBlock" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InvestmentPolicyTextBlock" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueRecognitionPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueRecognitionPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_RevenueRecognitionPolicyTextBlock" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfSalesPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfSalesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CostOfSalesPolicyTextBlock" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueOfFinancialInstrumentsPolicy" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueOfFinancialInstrumentsPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_FairValueOfFinancialInstrumentsPolicy" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_IncomeTaxPolicyTextBlock" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ComprehensiveIncomePolicyPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ComprehensiveIncomePolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ComprehensiveIncomePolicyPolicyTextBlock" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" order="16" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InterestAndOtherIncomeTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestAndOtherIncomeTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InterestAndOtherIncomeTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfInventoryCurrentTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentTextBlock" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/INVESTMENTSTables">
    <loc xlink:type="locator" xlink:label="invest_InvestmentsScheduleAbstract" xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_InvestmentsScheduleAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentsTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="invest_InvestmentsScheduleAbstract" xlink:to="us-gaap_EquityMethodInvestmentsTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfCondensedBalanceSheetTableTextBlock" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ScheduleOfCondensedBalanceSheetTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="invest_InvestmentsScheduleAbstract" xlink:to="srt_ScheduleOfCondensedBalanceSheetTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfFinancialInformationForEquityMethodInvestmentsTableTextBlock" xlink:href="rex-20190131.xsd#rex_ScheduleOfFinancialInformationForEquityMethodInvestmentsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="invest_InvestmentsScheduleAbstract" xlink:to="rex_ScheduleOfFinancialInformationForEquityMethodInvestmentsTableTextBlock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="invest_InvestmentsScheduleAbstract" xlink:to="us-gaap_HeldToMaturitySecuritiesTextBlock" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/BUSINESSCOMBINATIONSTables">
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessCombinationsAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FiniteLivedAndIndefiniteLivedIntangibleAssetsAcquiredAsPartOfBusinessCombinationTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedAndIndefiniteLivedIntangibleAssetsAcquiredAsPartOfBusinessCombinationTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BusinessCombinationsAbstract" xlink:to="us-gaap_FiniteLivedAndIndefiniteLivedIntangibleAssetsAcquiredAsPartOfBusinessCombinationTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/FAIRVALUETables">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/OTHERASSETSTables">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfOtherAssetsTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfOtherAssetsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_ScheduleOfOtherAssetsTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherCurrentLiabilitiesTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherCurrentLiabilitiesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_OtherCurrentLiabilitiesTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/LEASESTables">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/COMMONSTOCKTables">
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquityNoteAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfStockByClassTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfStockByClassTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StockholdersEquityNoteAbstract" xlink:to="us-gaap_ScheduleOfStockByClassTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/IncomeTaxesTables">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SegmentReportingTables">
    <loc xlink:type="locator" xlink:label="rex_SegmentReportingTablesLineItems" xlink:href="rex-20190131.xsd#rex_SegmentReportingTablesLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_SegmentReportingTablesTable" xlink:href="rex-20190131.xsd#rex_SegmentReportingTablesTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_SegmentReportingTablesLineItems" xlink:to="rex_SegmentReportingTablesTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SegmentReportingTablesTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="us-gaap_AssetsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SegmentReportingTablesLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATIONTables">
    <loc xlink:type="locator" xlink:label="us-gaap_QuarterlyFinancialInformationDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_QuarterlyFinancialInformationDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfQuarterlyFinancialInformationTableTextBlock" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfQuarterlyFinancialInformationTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_QuarterlyFinancialInformationDisclosureAbstract" xlink:to="us-gaap_ScheduleOfQuarterlyFinancialInformationTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofcomponentsofBasisofPresentationTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfComponentsOfBasisOfPresentationAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentIncomeInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentIncomeInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:to="us-gaap_InvestmentIncomeInterest" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfEquityInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfEquityInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:to="us-gaap_GainLossOnSaleOfEquityInvestments" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:to="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfOtherInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfOtherInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:to="us-gaap_GainLossOnSaleOfOtherInvestments" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentIncomeNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InvestmentIncomeNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfBasisOfPresentationAbstract" xlink:to="us-gaap_InvestmentIncomeNet" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofcomponentsofinventoryTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfComponentsOfInventoryAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfComponentsOfInventoryAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryFinishedGoodsNetOfReserves" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryFinishedGoodsNetOfReserves"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfInventoryAbstract" xlink:to="us-gaap_InventoryFinishedGoodsNetOfReserves" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryWorkInProcessNetOfReserves" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryWorkInProcessNetOfReserves"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfInventoryAbstract" xlink:to="us-gaap_InventoryWorkInProcessNetOfReserves" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryRawMaterialsNetOfReserves" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryRawMaterialsNetOfReserves"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfInventoryAbstract" xlink:to="us-gaap_InventoryRawMaterialsNetOfReserves" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfComponentsOfInventoryAbstract" xlink:to="us-gaap_InventoryNet" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofPropertyPlantandEquipmentTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfPropertyPlantAndEquipmentAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LandAndLandImprovements" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LandAndLandImprovements"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_LandAndLandImprovements" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingsAndImprovementsGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_BuildingsAndImprovementsGross" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MachineryAndEquipmentGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_MachineryAndEquipmentGross" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConstructionInProgressGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConstructionInProgressGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_ConstructionInProgressGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentGross" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfPropertyPlantAndEquipmentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfEquityMethodInvestmentsAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfEquityMethodInvestmentsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEquityMethodInvestmentsAbstract" xlink:to="us-gaap_EquityMethodInvestments" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEquityMethodInvestmentsAbstract" xlink:to="us-gaap_EquityMethodInvestmentOwnershipPercentage" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofCondensedBalanceSheetTable">
    <loc xlink:type="locator" xlink:label="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_CondensedBalanceSheetStatementsCaptionsLineItems"/>
    <loc xlink:type="locator" xlink:label="srt_CondensedBalanceSheetStatementTable" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_CondensedBalanceSheetStatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="srt_CondensedBalanceSheetStatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="srt_CondensedBalanceSheetStatementTable" xlink:to="dei_LegalEntityAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20190131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_AssetsCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_AssetsNoncurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_Assets" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_LiabilitiesCurrent" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_LiabilitiesNoncurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Liabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_Liabilities" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherMinorityInterests" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherMinorityInterests"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:to="us-gaap_OtherMinorityInterests" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofFinancialinformationForEquityMethodInvestmentTable">
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:href="rex-20190131.xsd#rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentTable" xlink:href="rex-20190131.xsd#rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:to="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20190131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationRevenue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentSummarizedFinancialInformationRevenue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:to="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationRevenue" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationGrossProfitLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentSummarizedFinancialInformationGrossProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:to="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationGrossProfitLoss" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationIncomeLossFromContinuingOperationsBeforeExtraordinaryItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentSummarizedFinancialInformationIncomeLossFromContinuingOperationsBeforeExtraordinaryItems"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:to="us-gaap_EquityMethodInvestmentSummarizedFinancialInformationIncomeLossFromContinuingOperationsBeforeExtraordinaryItems" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsScheduleofFinancialinformationForEquityMethodInvestmentLineItems" xlink:to="us-gaap_NetIncomeLoss" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofheldtomaturitysecurityTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfHeldToMaturitySecurityAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfHeldToMaturitySecurityAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfHeldToMaturitySecurityAbstract" xlink:to="us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithoutSingleMaturityDateNetCarryingAmount" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesUnrealizedGainLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesUnrealizedGainLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfHeldToMaturitySecurityAbstract" xlink:to="us-gaap_DebtSecuritiesUnrealizedGainLoss" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesFairValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecuritiesFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfHeldToMaturitySecurityAbstract" xlink:to="us-gaap_HeldToMaturitySecuritiesFairValue" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofEstimatedFairValuesofAssetsAcquiredatAcquisitionDateTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfEstimatedFairValuesOfAssetsAcquiredAtAcquisitionDateAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfEstimatedFairValuesOfAssetsAcquiredAtAcquisitionDateAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEstimatedFairValuesOfAssetsAcquiredAtAcquisitionDateAbstract" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEstimatedFairValuesOfAssetsAcquiredAtAcquisitionDateAbstract" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireBusinessesGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEstimatedFairValuesOfAssetsAcquiredAtAcquisitionDateAbstract" xlink:to="us-gaap_PaymentsToAcquireBusinessesGross" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable">
    <loc xlink:type="locator" xlink:label="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:href="rex-20190131.xsd#rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" xlink:href="rex-20190131.xsd#rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel1Member" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel2Member" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel3Member" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinancialInstrumentsOwnedDerivativesAndOtherContractualAgreementsAtFairValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FinancialInstrumentsOwnedDerivativesAndOtherContractualAgreementsAtFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="us-gaap_FinancialInstrumentsOwnedDerivativesAndOtherContractualAgreementsAtFairValue" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_InvestmentInCooperativeFairValueDisclosure" xlink:href="rex-20190131.xsd#rex_InvestmentInCooperativeFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="rex_InvestmentInCooperativeFairValueDisclosure" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsFairValueDisclosure" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="us-gaap_AssetsFairValueDisclosure" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsLiabilityFairValue" xlink:href="rex-20190131.xsd#rex_ForwardPurchaseContractsLiabilityFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="rex_ForwardPurchaseContractsLiabilityFairValue" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Liabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="us-gaap_Liabilities" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsAsset" xlink:href="rex-20190131.xsd#rex_ForwardPurchaseContractsAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FAIRVALUEDetailsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisLineItems" xlink:to="rex_ForwardPurchaseContractsAsset" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfOtherAssetsAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfOtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfOtherAssetsAbstract" xlink:to="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RealEstateTaxesRefundableNoncurrent" xlink:href="rex-20190131.xsd#rex_RealEstateTaxesRefundableNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfOtherAssetsAbstract" xlink:to="rex_RealEstateTaxesRefundableNoncurrent" order="1" xbrldt:closed="true"/>
<!-- [WMV4][XcpuxYn59dz7vgYynUDuwG7r97K2jUTysl7vcz0lJt+zoEiIZmtp2H7C6qvFYFNeA86aF0ybghZbK7fxvu022HCfsE6Ud1anyx4yqDpLTG3PYMPNkyR5zgsPwr6Daa8+BMgcOcPtzKtNTiQjeCpdmwyxkYVLSOCjEzABTh18BJlsFyWfvd8Cj2c5D3SVxsecrmjL5KhkmRv7ySR/swcFffYlSddf9LE+aPRssYVvf5OaibU+bEmeJfmn2nbBYlyAusPcQuj7+5XrJ+QFwi9MZA==] CSR-->
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsMiscellaneousNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsMiscellaneousNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfOtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsMiscellaneousNoncurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfOtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsNoncurrent" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofaccruedexpensesandothercurrentliabilitiesTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_EmployeeRelatedLiabilitiesCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedUtilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedUtilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_AccruedUtilitiesCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesAndOtherLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedLiabilitiesAndOtherLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_AccruedLiabilitiesAndOtherLiabilities" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedIncomeTaxes" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedIncomeTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_AccruedIncomeTaxes" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAccruedLiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_OtherAccruedLiabilitiesCurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfAccruedExpensesAndOtherCurrentLiabilitiesAbstract" xlink:to="us-gaap_OtherLiabilitiesCurrent" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofFutureMinimumRentalPaymentsforOperatingLeasesTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesAbstract" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofCommonStockTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfCommonStockAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfCommonStockAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesAuthorized" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfCommonStockAbstract" xlink:to="us-gaap_CommonStockSharesAuthorized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesIssued" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfCommonStockAbstract" xlink:to="us-gaap_CommonStockSharesIssued" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesOutstanding" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfCommonStockAbstract" xlink:to="us-gaap_CommonStockSharesOutstanding" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofFairValuesforDerivativeFinancialInstrumentsTable">
    <loc xlink:type="locator" xlink:label="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsLineItems" xlink:href="rex-20190131.xsd#rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsTable" xlink:href="rex-20190131.xsd#rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsLineItems" xlink:to="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommodityContractMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommodityContractMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_CommodityContractMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ForwardContractsMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ForwardContractsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForwardContractsMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsLineItems" xlink:to="us-gaap_DerivativeAssets" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsScheduleofFairValuesforDerivativeFinancialInstrumentsLineItems" xlink:to="us-gaap_DerivativeLiabilities" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofNonVestedRestrictedStockAwardActivityTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" xlink:href="rex-20190131.xsd#rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardEquityInstrumentsOtherThanOptionsAggregateIntrinsicValueVested" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardEquityInstrumentsOtherThanOptionsAggregateIntrinsicValueVested"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfNonVestedRestrictedStockAwardActivityAbstract" xlink:to="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardEquityInstrumentsOtherThanOptionsAggregateIntrinsicValueVested" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofUnrecognizedTaxBenefitsRollForwardTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract"/>
    <loc xlink:type="locator" xlink:label="rex_FederalAbstract" xlink:href="rex-20190131.xsd#rex_FederalAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="rex_FederalAbstract" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CurrentFederalTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FederalAbstract" xlink:to="us-gaap_CurrentFederalTaxExpenseBenefit" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredFederalIncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FederalAbstract" xlink:to="us-gaap_DeferredFederalIncomeTaxExpenseBenefit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FederalAbstract" xlink:to="us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StateAndLocalAbstract" xlink:href="rex-20190131.xsd#rex_StateAndLocalAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="rex_StateAndLocalAbstract" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CurrentStateAndLocalTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_StateAndLocalAbstract" xlink:to="us-gaap_CurrentStateAndLocalTaxExpenseBenefit" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_StateAndLocalAbstract" xlink:to="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_StateAndLocalAbstract" xlink:to="us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofDeferredTaxAssetsandLiabilitiesTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_AssetsAbstract" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsOther" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_DeferredTaxAssetsOther" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsValuationAllowance" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_DeferredTaxAssetsValuationAllowance" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_DeferredTaxAssetsNet" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_LiabilitiesAbstract" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation" xlink:href="rex-20190131.xsd#rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesAbstract" xlink:to="rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilitiesOther" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesAbstract" xlink:to="us-gaap_DeferredTaxLiabilitiesOther" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_DeferredIncomeTaxLiabilities" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfDeferredTaxAssetsAndLiabilitiesAbstract" xlink:to="us-gaap_DeferredTaxLiabilities" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofEffectiveIncomeTaxReconciliationTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconcilliationSection45ProductionTaxCredits" xlink:href="rex-20190131.xsd#rex_EffectiveIncomeTaxRateReconcilliationSection45ProductionTaxCredits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconcilliationSection45ProductionTaxCredits" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliationResearchAndExperimentationCreditsinDollars" xlink:href="rex-20190131.xsd#rex_EffectiveIncomeTaxRateReconciliationResearchAndExperimentationCreditsinDollars"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliationResearchAndExperimentationCreditsinDollars" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconcilliationTaxCutsAndJobsAct" xlink:href="rex-20190131.xsd#rex_EffectiveIncomeTaxRateReconcilliationTaxCutsAndJobsAct"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconcilliationTaxCutsAndJobsAct" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationDeductionsQualifiedProductionActivities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationDeductionsQualifiedProductionActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationDeductionsQualifiedProductionActivities" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliationUncertainTaxPositions" xlink:href="rex-20190131.xsd#rex_EffectiveIncomeTaxRateReconciliationUncertainTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliationUncertainTaxPositions" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfEffectiveIncomeTaxReconciliationAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateContinuingOperations" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofUnrecognizedTaxBenefitsRollForwardTable0">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_UnrecognizedTaxBenefitsAndAccruedInterestAndPenalties" xlink:href="rex-20190131.xsd#rex_UnrecognizedTaxBenefitsAndAccruedInterestAndPenalties"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfUnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="rex_UnrecognizedTaxBenefitsAndAccruedInterestAndPenalties" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleOfSegmentResultsAndAssetsTable">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20190131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_RefinedCoalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CorporateAndOtherMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CorporateAndOtherMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="us-gaap_CorporateAndOtherMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DriedDistillersGrainsMember" xlink:href="rex-20190131.xsd#rex_DriedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_DriedDistillersGrainsMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonFoodGradeCornOilMember" xlink:href="rex-20190131.xsd#rex_NonFoodGradeCornOilMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_NonFoodGradeCornOilMember" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ModifiedDistillersGrainsMember" xlink:href="rex-20190131.xsd#rex_ModifiedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_ModifiedDistillersGrainsMember" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AllOtherSegmentsMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllOtherSegmentsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="us-gaap_AllOtherSegmentsMember" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_Revenues" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_GrossProfit" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossFromContinuingOperationsAvailableToCommonShareholdersBasic" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLossFromContinuingOperationsAvailableToCommonShareholdersBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_NetIncomeLossFromContinuingOperationsAvailableToCommonShareholdersBasic" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_SalesRevenueBySegment" xlink:href="rex-20190131.xsd#rex_SalesRevenueBySegment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="rex_SalesRevenueBySegment" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_SalesOfProductsRefinedCoalSegment" xlink:href="rex-20190131.xsd#rex_SalesOfProductsRefinedCoalSegment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="rex_SalesOfProductsRefinedCoalSegment" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InterestIncomeOperating" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeOperating"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_InterestIncomeOperating" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationAndAmortization" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepreciationAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_DepreciationAndAmortization" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_GainLossOnSaleOfInvestments" order="11" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleOfSegmentAssetsTable">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20190131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_RefinedCoalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CorporateAndOtherMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CorporateAndOtherMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="us-gaap_CorporateAndOtherMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_Assets" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AdditionsToOtherLongLivedAssetsAbstract" xlink:href="rex-20190131.xsd#rex_AdditionsToOtherLongLivedAssetsAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="rex_AdditionsToOtherLongLivedAssetsAbstract" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionsToOtherAssetsAmount" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionsToOtherAssetsAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_AdditionsToOtherLongLivedAssetsAbstract" xlink:to="us-gaap_AdditionsToOtherAssetsAmount" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AdditionsToPropertyAndEquipmentAbstract" xlink:href="rex-20190131.xsd#rex_AdditionsToPropertyAndEquipmentAbstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="rex_AdditionsToPropertyAndEquipmentAbstract" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentAdditions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentAdditions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_AdditionsToPropertyAndEquipmentAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentAdditions" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/ScheduleofQuarterlyFinancialInformationTable">
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:href="rex-20190131.xsd#rex_ScheduleOfQuarterlyFinancialInformationAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:to="us-gaap_GrossProfit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:to="us-gaap_ProfitLoss" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:to="us-gaap_NetIncomeLoss" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasicAndDiluted" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EarningsPerShareBasicAndDiluted"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_ScheduleOfQuarterlyFinancialInformationAbstract" xlink:to="us-gaap_EarningsPerShareBasicAndDiluted" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/VALUATIONANDQUALIFYINGACCOUNTSTable">
    <loc xlink:type="locator" xlink:label="srt_ValuationAndQualifyingAccountsAbstract" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ValuationAndQualifyingAccountsAbstract"/>
    <loc xlink:type="locator" xlink:label="rex_a2019Abstract" xlink:href="rex-20190131.xsd#rex_a2019Abstract"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ValuationAndQualifyingAccountsAbstract" xlink:to="rex_a2019Abstract" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsValuationAllowance" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_a2019Abstract" xlink:to="us-gaap_DeferredTaxAssetsValuationAllowance" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_a2019Abstract" xlink:to="us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails">
    <loc xlink:type="locator" xlink:label="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:href="rex-20190131.xsd#rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:href="rex-20190131.xsd#rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ConsolidationItemsAxis" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_ConsolidationItemsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ConsolidationItemsDomain" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ConsolidationItemsAxis" xlink:to="srt_ConsolidationItemsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ConsolidationItemsDomain_0" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ConsolidationItemsAxis" xlink:to="srt_ConsolidationItemsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TypeOfAdoptionMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:to="us-gaap_TypeOfAdoptionMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TypeOfAdoptionMember_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:to="us-gaap_TypeOfAdoptionMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskByTypeAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_ConcentrationRiskByTypeAxis" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskTypeDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskTypeDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_OwnershipAxis" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_OwnershipAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_OwnershipAxis" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_OwnershipDomain" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_OwnershipDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_OwnershipAxis" xlink:to="srt_OwnershipDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_OwnershipDomain_0" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_OwnershipDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_OwnershipAxis" xlink:to="srt_OwnershipDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_RangeAxis" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinancialInstrumentAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FinancialInstrumentAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_FinancialInstrumentAxis" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_IncomeStatementLocationAxis" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_PropertyPlantAndEquipmentByTypeAxis" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfSalesMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfSalesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_CostOfSalesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingAndBuildingImprovementsMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BuildingAndBuildingImprovementsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="us-gaap_BuildingAndBuildingImprovementsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FixturesAndEquipmentMember" xlink:href="rex-20190131.xsd#rex_FixturesAndEquipmentMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="rex_FixturesAndEquipmentMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidatedEntitiesMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConsolidatedEntitiesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ConsolidationItemsDomain" xlink:to="us-gaap_ConsolidatedEntitiesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvesteeMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvesteeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ConsolidationItemsDomain" xlink:to="us-gaap_EquityMethodInvesteeMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_RefinedCoalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ContractsNotAccountedForUnderNormalPurchasesAndNormalSalesMember" xlink:href="rex-20190131.xsd#rex_ContractsNotAccountedForUnderNormalPurchasesAndNormalSalesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_ContractsNotAccountedForUnderNormalPurchasesAndNormalSalesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_OwnershipDomain" xlink:to="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingStandardsUpdate201618Member" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountingStandardsUpdate201618Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfAdoptionMember" xlink:to="us-gaap_AccountingStandardsUpdate201618Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CustomerConcentrationRiskMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CustomerConcentrationRiskMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskTypeDomain" xlink:to="us-gaap_CustomerConcentrationRiskMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NumberOfOperatingEntities" xlink:href="rex-20190131.xsd#rex_NumberOfOperatingEntities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_NumberOfOperatingEntities" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_NumberOfReportableSegments" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskCustomer" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskCustomer"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_ConcentrationRiskCustomer" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskPercentage1" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ConcentrationRiskPercentage1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_ConcentrationRiskPercentage1" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_IncomeTaxExaminationPenaltiesAndInterestAccrued" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentDepreciationMethods" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentDepreciationMethods"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentDepreciationMethods" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentEstimatedUsefulLives" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentEstimatedUsefulLives"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentEstimatedUsefulLives" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Depreciation" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Depreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_Depreciation" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_MaximumPercentageOfEquityOwnershipInterestWhichMayBeConsideredForEquityMethodOfAccounting" xlink:href="rex-20190131.xsd#rex_MaximumPercentageOfEquityOwnershipInterestWhichMayBeConsideredForEquityMethodOfAccounting"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_MaximumPercentageOfEquityOwnershipInterestWhichMayBeConsideredForEquityMethodOfAccounting" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Liabilities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_Liabilities" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_Assets" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseInRestrictedCash" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseInRestrictedCash"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_IncreaseInRestrictedCash" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseRightOfUseAsset" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_OperatingLeaseRightOfUseAsset" order="15" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/INVESTMENTSDetails">
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSDetailsLineItems" xlink:href="rex-20190131.xsd#rex_INVESTMENTSDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSDetailsTable" xlink:href="rex-20190131.xsd#rex_INVESTMENTSDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="rex_INVESTMENTSDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_INVESTMENTSDetailsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20190131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireEquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_PaymentsToAcquireEquityMethodInvestments" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfEthanolShipped" xlink:href="rex-20190131.xsd#rex_QuantityOfEthanolShipped"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="rex_QuantityOfEthanolShipped" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentDividendsOrDistributions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentDividendsOrDistributions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_EquityMethodInvestmentDividendsOrDistributions" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_EquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherRestrictedAssets" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherRestrictedAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_OtherRestrictedAssets" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProportionateShareOfRestrictedNetAssets" xlink:href="rex-20190131.xsd#rex_ProportionateShareOfRestrictedNetAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="rex_ProportionateShareOfRestrictedNetAssets" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HeldToMaturitySecurities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSDetailsLineItems" xlink:to="us-gaap_HeldToMaturitySecurities" order="10" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/BUSINESSCOMBINATIONSDetails">
    <loc xlink:type="locator" xlink:label="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:href="rex-20190131.xsd#rex_BUSINESSCOMBINATIONSDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_BUSINESSCOMBINATIONSDetailsTable" xlink:href="rex-20190131.xsd#rex_BUSINESSCOMBINATIONSDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="rex_BUSINESSCOMBINATIONSDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_BUSINESSCOMBINATIONSDetailsTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_RefinedCoalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterestOwnershipPercentageByParent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MinorityInterestOwnershipPercentageByParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_MinorityInterestOwnershipPercentageByParent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NetSalesAndRevenueOfBusinessSegment" xlink:href="rex-20190131.xsd#rex_NetSalesAndRevenueOfBusinessSegment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="rex_NetSalesAndRevenueOfBusinessSegment" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_NetIncomeLoss" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionsProFormaRevenue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionsProFormaRevenue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_BusinessAcquisitionsProFormaRevenue" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_BusinessAcquisitionsProFormaNetIncomeLoss" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireBusinessesGross" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_PaymentsToAcquireBusinessesGross" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionCostOfAcquiredEntityTransactionCosts" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessAcquisitionCostOfAcquiredEntityTransactionCosts"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_BUSINESSCOMBINATIONSDetailsLineItems" xlink:to="us-gaap_BusinessAcquisitionCostOfAcquiredEntityTransactionCosts" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/COMMONSTOCKDetails">
    <loc xlink:type="locator" xlink:label="rex_COMMONSTOCKDetailsLineItems" xlink:href="rex-20190131.xsd#rex_COMMONSTOCKDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_COMMONSTOCKDetailsTable" xlink:href="rex-20190131.xsd#rex_COMMONSTOCKDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="rex_COMMONSTOCKDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationTechniqueAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationTechniqueAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_COMMONSTOCKDetailsTable" xlink:to="us-gaap_ValuationTechniqueAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationTechniqueDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationTechniqueDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ValuationTechniqueAxis" xlink:to="us-gaap_ValuationTechniqueDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationTechniqueDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationTechniqueDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ValuationTechniqueAxis" xlink:to="us-gaap_ValuationTechniqueDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ApporximationMember" xlink:href="rex-20190131.xsd#rex_ApporximationMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationTechniqueDomain" xlink:to="rex_ApporximationMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockSharesAcquired" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_TreasuryStockSharesAcquired" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_TreasuryStockValueAcquiredCostMethod" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased" xlink:href="rex-20190131.xsd#rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/REVOLVINGLINESOFCREDITDetails">
    <loc xlink:type="locator" xlink:label="us-gaap_DebtDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtDisclosureAbstract" xlink:to="us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtInstrumentMaturityDate" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentMaturityDate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtDisclosureAbstract" xlink:to="us-gaap_DebtInstrumentMaturityDate" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LineOfCreditFacilityInterestRateDescription" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityInterestRateDescription"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtDisclosureAbstract" xlink:to="us-gaap_LineOfCreditFacilityInterestRateDescription" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSDetails">
    <loc xlink:type="locator" xlink:label="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:href="rex-20190131.xsd#rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsTable" xlink:href="rex-20190131.xsd#rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:to="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TradingActivityByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsTable" xlink:to="us-gaap_TradingActivityByTypeAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsTable" xlink:to="us-gaap_ContractWithCustomerDurationAxis" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CornMember" xlink:href="rex-20190131.xsd#rex_CornMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_CornMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20190131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShortSellMember" xlink:href="rex-20190131.xsd#rex_ShortSellMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="rex_ShortSellMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_LongBuyMember" xlink:href="rex-20190131.xsd#rex_LongBuyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="rex_LongBuyMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CommodityFuturesQuantity" xlink:href="rex-20190131.xsd#rex_CommodityFuturesQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:to="rex_CommodityFuturesQuantity" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20190131.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtInstrumentCollateralAmount" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentCollateralAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:to="us-gaap_DebtInstrumentCollateralAmount" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeGainOnDerivative" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeGainOnDerivative"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_DERIVATIVEFINANCIALINSTRUMENTSDetailsLineItems" xlink:to="us-gaap_DerivativeGainOnDerivative" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITSDetails">
    <loc xlink:type="locator" xlink:label="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:href="rex-20190131.xsd#rex_EMPLOYEEBENEFITSDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_EMPLOYEEBENEFITSDetailsTable" xlink:href="rex-20190131.xsd#rex_EMPLOYEEBENEFITSDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:to="rex_EMPLOYEEBENEFITSDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_EMPLOYEEBENEFITSDetailsTable" xlink:to="us-gaap_PlanNameAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareholdersEquityClassAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareholdersEquityClassAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_EMPLOYEEBENEFITSDetailsTable" xlink:to="us-gaap_ShareholdersEquityClassAxis" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByShareholdersEquityClassDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueByShareholdersEquityClassDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ShareholdersEquityClassAxis" xlink:to="us-gaap_FairValueByShareholdersEquityClassDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByShareholdersEquityClassDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FairValueByShareholdersEquityClassDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ShareholdersEquityClassAxis" xlink:to="us-gaap_FairValueByShareholdersEquityClassDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AwardTypeAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_EMPLOYEEBENEFITSDetailsTable" xlink:to="us-gaap_AwardTypeAxis" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeStockOptionMember" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeStockOptionMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_EmployeeStockOptionMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RexShareholdersMember" xlink:href="rex-20190131.xsd#rex_RexShareholdersMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueByShareholdersEquityClassDomain" xlink:to="rex_RexShareholdersMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockOptionPlans2015Member" xlink:href="rex-20190131.xsd#rex_StockOptionPlans2015Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PlanNameDomain" xlink:to="rex_StockOptionPlans2015Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_EMPLOYEEBENEFITSDetailsLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/CommitmentsDetails">
    <loc xlink:type="locator" xlink:label="rex_CommitmentsDetailsLineItems" xlink:href="rex-20190131.xsd#rex_CommitmentsDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_CommitmentsDetailsTable" xlink:href="rex-20190131.xsd#rex_CommitmentsDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_CommitmentsDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_CommitmentsDetailsTable" xlink:to="dei_LegalEntityAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseArrangementTypeAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeaseArrangementTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_CommitmentsDetailsTable" xlink:to="us-gaap_LeaseArrangementTypeAxis" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseArrangementTypeDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeaseArrangementTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LeaseArrangementTypeAxis" xlink:to="us-gaap_LeaseArrangementTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseArrangementTypeDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LeaseArrangementTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LeaseArrangementTypeAxis" xlink:to="us-gaap_LeaseArrangementTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertySubjectToOrAvailableForOperatingLeaseAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_CommitmentsDetailsTable" xlink:to="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseAxis" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseAxis" xlink:to="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseAxis" xlink:to="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RenewalMember" xlink:href="rex-20190131.xsd#rex_RenewalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseArrangementTypeDomain" xlink:to="rex_RenewalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NaturalGasPipelineMember" xlink:href="rex-20190131.xsd#rex_NaturalGasPipelineMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain" xlink:to="rex_NaturalGasPipelineMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RailcarsOneMember" xlink:href="rex-20190131.xsd#rex_RailcarsOneMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain" xlink:to="rex_RailcarsOneMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DistillersGrainsMarketingServicesMember" xlink:href="rex-20190131.xsd#rex_DistillersGrainsMarketingServicesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertySubjectToOrAvailableForOperatingLeaseDomain" xlink:to="rex_DistillersGrainsMarketingServicesMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyAndNuGenEnergyMember" xlink:href="rex-20190131.xsd#rex_OneEarthEnergyAndNuGenEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyAndNuGenEnergyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyMember" xlink:href="rex-20190131.xsd#rex_OneEarthEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AllianceGrainMember" xlink:href="rex-20190131.xsd#rex_AllianceGrainMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_AllianceGrainMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_RefinedCoalMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20190131.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfEthanolUnderSalesCommitment" xlink:href="rex-20190131.xsd#rex_QuantityOfEthanolUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_QuantityOfEthanolUnderSalesCommitment" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfDistillersGrainsUnderSalesCommitment" xlink:href="rex-20190131.xsd#rex_QuantityOfDistillersGrainsUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_QuantityOfDistillersGrainsUnderSalesCommitment" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" xlink:href="rex-20190131.xsd#rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_SupplyCommitmentExpectedPeriodOfDelivery" xlink:href="rex-20190131.xsd#rex_SupplyCommitmentExpectedPeriodOfDelivery"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_SupplyCommitmentExpectedPeriodOfDelivery" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_LeaseExpirationPeriod" xlink:href="rex-20190131.xsd#rex_LeaseExpirationPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_LeaseExpirationPeriod" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NumberOfInstallmentsPayable" xlink:href="rex-20190131.xsd#rex_NumberOfInstallmentsPayable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_NumberOfInstallmentsPayable" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_InstallmentAmount" xlink:href="rex-20190131.xsd#rex_InstallmentAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_InstallmentAmount" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasesRentExpenseNet" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesRentExpenseNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="us-gaap_OperatingLeasesRentExpenseNet" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MarketingExpense" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MarketingExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="us-gaap_MarketingExpense" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_PercentageOfGrainPurchaseUnderAgreement" xlink:href="rex-20190131.xsd#rex_PercentageOfGrainPurchaseUnderAgreement"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_PercentageOfGrainPurchaseUnderAgreement" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ExpirationDateOfGrainAgreement" xlink:href="rex-20190131.xsd#rex_ExpirationDateOfGrainAgreement"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_ExpirationDateOfGrainAgreement" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_MaximumPeriodToNotifyOtherPartyForGrainAgreementPeriodExtension" xlink:href="rex-20190131.xsd#rex_MaximumPeriodToNotifyOtherPartyForGrainAgreementPeriodExtension"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_MaximumPeriodToNotifyOtherPartyForGrainAgreementPeriodExtension" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FeesIncurredBySubsidiary" xlink:href="rex-20190131.xsd#rex_FeesIncurredBySubsidiary"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_CommitmentsDetailsLineItems" xlink:to="rex_FeesIncurredBySubsidiary" order="15" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/IncomeTaxesDetails">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsValuationAllowance" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsValuationAllowance" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceMethodologiesAndAssumptions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ValuationAllowanceMethodologiesAndAssumptions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ValuationAllowanceMethodologiesAndAssumptions" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredOtherTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredOtherTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredOtherTaxExpenseBenefit" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TaxAdjustmentsSettlementsAndUnusualProvisions" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxAdjustmentsSettlementsAndUnusualProvisions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_TaxAdjustmentsSettlementsAndUnusualProvisions" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TaxCreditCarryforwardAmount" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TaxCreditCarryforwardAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_TaxCreditCarryforwardAmount" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredFederalStateAndLocalTaxExpenseBenefit" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredFederalStateAndLocalTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredFederalStateAndLocalTaxExpenseBenefit" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesPaid" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxesPaid"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxesPaid" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromIncomeTaxRefunds" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromIncomeTaxRefunds"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ProceedsFromIncomeTaxRefunds" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_IncreaseDecreaseInProvisionForIncomeTaxes" xlink:href="rex-20190131.xsd#rex_IncreaseDecreaseInProvisionForIncomeTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_IncreaseDecreaseInProvisionForIncomeTaxes" order="12" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/SegmentReportingDetails">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_NumberOfReportableSegments" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/RELATEDPARTIESDetails">
    <loc xlink:type="locator" xlink:label="rex_RELATEDPARTIESDetailsLineItems" xlink:href="rex-20190131.xsd#rex_RELATEDPARTIESDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_RELATEDPARTIESDetailsTable" xlink:href="rex-20190131.xsd#rex_RELATEDPARTIESDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="rex_RELATEDPARTIESDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_RELATEDPARTIESDetailsTable" xlink:to="dei_LegalEntityAxis" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_RELATEDPARTIESDetailsTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RefinedCoalMember" xlink:href="rex-20190131.xsd#rex_RefinedCoalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="rex_RefinedCoalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyAndNuGenEnergyMember" xlink:href="rex-20190131.xsd#rex_OneEarthEnergyAndNuGenEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyAndNuGenEnergyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostsAndExpensesRelatedParty" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostsAndExpensesRelatedParty"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="us-gaap_CostsAndExpensesRelatedParty" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableRelatedPartiesCurrent" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableRelatedPartiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="us-gaap_AccountsPayableRelatedPartiesCurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionSellingGeneralAndAdministrativeExpensesFromTransactionsWithRelatedParty" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RelatedPartyTransactionSellingGeneralAndAdministrativeExpensesFromTransactionsWithRelatedParty"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="us-gaap_RelatedPartyTransactionSellingGeneralAndAdministrativeExpensesFromTransactionsWithRelatedParty" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesForCommissionsExpenseAndTaxes" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedLiabilitiesForCommissionsExpenseAndTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="us-gaap_AccruedLiabilitiesForCommissionsExpenseAndTaxes" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromContributionsFromAffiliates" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromContributionsFromAffiliates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_RELATEDPARTIESDetailsLineItems" xlink:to="us-gaap_ProceedsFromContributionsFromAffiliates" order="5" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:type="extended" xlink:role="http://www.rexamerican.com/role/DocumentAndEntityInformation">
    <loc xlink:type="locator" xlink:label="dei_DocumentInformationLineItems" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_DocumentInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="dei_EntityRegistrantName" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityRegistrantName"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityRegistrantName" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_TradingSymbol" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_TradingSymbol"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_TradingSymbol" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_DocumentType" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_DocumentType"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_DocumentType" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_CurrentFiscalYearEndDate" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_CurrentFiscalYearEndDate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_CurrentFiscalYearEndDate" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityCommonStockSharesOutstanding" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityCommonStockSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityCommonStockSharesOutstanding" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityPublicFloat" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityPublicFloat"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityPublicFloat" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_AmendmentFlag" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_AmendmentFlag"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_AmendmentFlag" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_AmendmentDescription" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_AmendmentDescription"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_AmendmentDescription" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityCentralIndexKey" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityCentralIndexKey"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityCentralIndexKey" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityCurrentReportingStatus" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityCurrentReportingStatus"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityCurrentReportingStatus" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityVoluntaryFilers" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityVoluntaryFilers"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityVoluntaryFilers" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityFilerCategory" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityFilerCategory"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityFilerCategory" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityWellKnownSeasonedIssuer" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityWellKnownSeasonedIssuer"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityWellKnownSeasonedIssuer" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_DocumentPeriodEndDate" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_DocumentPeriodEndDate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_DocumentPeriodEndDate" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_DocumentFiscalYearFocus" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_DocumentFiscalYearFocus"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_DocumentFiscalYearFocus" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_DocumentFiscalPeriodFocus" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_DocumentFiscalPeriodFocus"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_DocumentFiscalPeriodFocus" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntitySmallBusiness" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntitySmallBusiness"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntitySmallBusiness" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityEmergingGrowthCompany" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityEmergingGrowthCompany"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityEmergingGrowthCompany" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityShellCompany" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityShellCompany"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityShellCompany" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityExTransitionPeriod" xlink:href="https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd#dei_EntityExTransitionPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_DocumentInformationLineItems" xlink:to="dei_EntityExTransitionPeriod" order="19" xbrldt:closed="true"/>
  </definitionLink>
</linkbase>
</XBRL>
